https://guide-fin.ncloud-docs.com/docs/k8s-k8suse-albingress
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/guide/ingress/annotations/#auth-scope
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "wsi-match-ingress"
namespace: wsi-skills-namespace
annotations:
alb.ingress.kubernetes.io/load-balancer-name: wsi-match-alb
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]'
spec:
rules:
- http:
paths:
- path: /skills
pathType: Prefix
backend:
service:
name: "wsi-stress-service"
port:
number: 8080 #무조건 서비스 포트랑 같아야한다. 다르면 ALB 생성 조차가 안된다
- path: /worldskills
pathType: Prefix
backend:
service:
name: "wsi-match-service"
port:
number: 80 #무조건 서비스 포트랑 같아야한다. 다르면 ALB 생성 조차가 안된다
apiVersion: extensions/v1
kind: Ingress
metadata:
name: "ingress"
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
# 여기서 부터 아래를 잘 확인하자.
alb.ingress.kubernetes.io/actions.redirect-to-https: >
{"Type":"redirect","RedirectConfig":{"Port":"443","Protocol":"HTTPS","StatusCode":"HTTP_302"}}
alb.ingress.kubernetes.io/certificate-arn: {Certificate Manger의 인증서 arn}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "wsi-match-ingress"
namespace: wsi-skills-namespace
annotations:
alb.ingress.kubernetes.io/security-groups: sg-063f7297e5a465537
alb.ingress.kubernetes.io/load-balancer-name: wsi-match-alb
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: search-app-ingress
spec:
rules:
- http:
paths:
- path: /skills
pathType: Prefix
backend:
service:
name: "wsi-stress-service"
port:
number: 8080 #무조건 서비스 포트랑 같아야한다. 다르면 ALB 생성 조차가 안된다
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "wscf-ingress"
namespace: wscf-api
annotations:
alb.ingress.kubernetes.io/load-balancer-name: wsi-alb
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internal
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/subnets: subnet-0c3d8a84f912a87a4, subnet-0de4400ec6fcad5fb
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80},{"HTTPS": 443}, {"HTTP": 8080}]' #이 부분은 즉, ALB에 보안그룹에도 관련이있다.
alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests #이 부분을 초점두세요
spec:
rules:
- http:
paths:
- path: /users
pathType: Prefix
backend:
service:
name: "wscf-service"
port:
number: 8080 #무조건 서비스 포트랑 같아야한다. 다르면 ALB 생성 조차가 안된다