KR_AWS_Ingress - somaz94/DevOps-Engineer GitHub Wiki
- AWS์์ ingress group์ ์ฌ๋ฌ ๊ฐ์ ingress ๋ฆฌ์์ค๋ฅผ ํ๋์ ๋ก๋ ๋ฐธ๋ฐ์(ALB)๋ก ํตํฉํ์ฌ ๊ด๋ฆฌํ ์ ์๊ฒ ํด์ฃผ๋ ๊ธฐ๋ฅ์ด๋ค.
- ์ด๋ฅผ ํตํด ์ฌ๋ฌ Kubernetes ๋ค์์คํ์ด์ค๋ ์๋ก ๋ค๋ฅธ ํ์ ์ ํ๋ฆฌ์ผ์ด์ ๋ค์ด ๊ฐ์ ALB๋ฅผ ๊ณต์ ํ๋ฉด์๋ ๊ฐ๊ธฐ ๋ค๋ฅธ Ingress ๊ท์น์ ์ค์ ํ ์ ์๋ค.
- ingress group์ ์ฌ์ฉํ๋ฉด ๋คํธ์ํฌ ๋ฆฌ์์ค๋ฅผ ์ ์ฝํ๊ณ ๊ด๋ฆฌ ํจ์จ์ฑ์ ๋์ผ ์ ์๋ค.
- ๊ธฐ๋ณธ์ ์ผ๋ก ingress๋ ingress group์ ์ํ์ง ์์ผ๋ฉฐ, ingress๋ "implicit IngressGroup" ์ด๋ฉฐ ์ฆ, ๋ ๋ฆฝ์ ์ธ ์ํฐํฐ๋ก ์กด์ฌํ๋ค.
-
alb.ingress.kubernetes.io/group.name์ด๋ ธํ ์ด์ ์ ์ฌ์ฉํ์ฌ ๊ทธ๋ฃน ์ด๋ฆ์ ์ ์ํ๋ค. - ๋์ผํ ๊ทธ๋ฃน ์ด๋ฆ์ ๊ฐ์ง ingress ๋ฆฌ์์ค๋ ํ๋์ ALB๋ฅผ ๊ณต์ ํ๊ฒ ๋๋ค.
- ingress group์ ํ ๋น๋ ALB๋
ingress.k8s.aws/stack์ด์ด๋ AWS ํ๊ทธ๋ฅผ ๊ฒ์ํ์ฌ ์ฐพ๋๋ค.(๋ฆฌ์ค๋ ๊ท์น์ ํ๊ทธ๋ก ๋์ด์์) ์ด ํ๊ทธ์ ๊ฐ์ผ๋ก IngressGroup์ ์ด๋ฆ์ ๊ฐ์ง๊ฒ ๋๋ค. - ingress group์ ์ฌ์ฉํ์ง ์์ ๋ฆฌ์์ค๋ค์ ํ๊ทธ ๊ฐ์
namespace/ingressnameํ์์ผ๋ก ์ค์ ํ๋ค. - ingress ๋ฆฌ์์ค์ ํ ๋น๋ groupName์ ๋ณ๊ฒฝํ๋ฉด, Ingress๋ ๊ธฐ์กด ๊ทธ๋ฃน์์ ์๋ก์ด IngressGroup์ผ๋ก ์ด๋ํ๊ฒ ๋๋ฉฐ, ์๋ก์ด IngressGroup์ ALB์์ ๊ด๋ฆฌ๋๋ค.
- ๋ง์ฝ ์๋ก์ด IngressGroup์ ALB๊ฐ ์๋ค๋ฉด, ์๋ก์ด ALB๊ฐ ์๋์ผ๋ก ์์ฑ๋๋ค.
- ingress group์ ALB๋ ingress group์ ์ด๋ฆ์ ๊ฐ์ผ๋ก ํ๋ AWS ํ๊ทธ
ingress.k8s.aws/์คํ ํ๊ทธ๋ฅผ ๊ฒ์ํ์ฌ ์ฐพ์ ์ ์๋ค. - example:
alb.ingress.kubernetes.io/group.name: my-team.awesome-group
-
alb.ingress.kubernetes.io/group.order์ด๋ ธํ ์ด์ ์ ์ฌ์ฉํด ์์๋ฅผ ์ง์ ํ ์ ์๋ค. - ๋ฎ์ ์ซ์์ order ๊ฐ์ ๊ฐ์ง ingress ๊ท์น์ด ์ฐ์ ์ ์ฉ๋๋ฉฐ, ๋์ผํ path๋ host์ ๋ํด ํน์ ์ฐ์ ์์๋ฅผ ์ง์ ํ ์ ์๋ค.
- example:
alb.ingress.kubernetes.io/group.order: 10
์๋ ์์์์ ๋ ๊ฐ์ ingress ๋ฆฌ์์ค๊ฐ my-shared-group ์ด๋ผ๋ ๊ทธ๋ฃน์ ๊ณต์ ํ๊ฒ ๋์ด ํ๋์ ALB์์ ์์ฒญ์ ์ฒ๋ฆฌํ๋ค.
# Ingress for Service A
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: service-a-ingress
annotations:
alb.ingress.kubernetes.io/group.name: "my-shared-group"
alb.ingress.kubernetes.io/group.order: "10"
spec:
rules:
- host: "service-a.example.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service-a
port:
number: 80
# Ingress for Service B
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: service-b-ingress
annotations:
alb.ingress.kubernetes.io/group.name: "my-shared-group"
alb.ingress.kubernetes.io/group.order: "20"
spec:
rules:
- host: "service-b.example.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service-b
port:
number: 80-
service-a์service-b๊ฐ ๊ฐ๊ฐ ingress ๊ทธ๋ฃนmy-shared-group์ ์ํ๊ฒ ๋๋ฉฐ,service-a๊ฐorder10์ผ๋ก ์ฐ์ ์ ์ฉ๋๋ค.
- ALB๊ฐ ์์ ํ๋ ํฌํธ๋ฅผ ์ง์ ํ๋ค.
- Example:
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}, {"HTTP": 8080}, {"HTTPS": 8443}]' - IngressGroup ๋ด์ ๋ชจ๋ Ingress์ ์ ์ฉ๋๋ฏ๋ก ๊ฐ Ingress๋ ๊ณ ์ ํ ํฌํธ๋ฅผ ์ ์ํ ์ ์์ผ๋ฉฐ ๊ท์น์ ๊ฐ Ingress์ ์ง์ ๋ ํฌํธ์๋ง ์ ์ฉ๋๋ค.
- ๋์ผํ ์์ ํฌํธ๊ฐ IngressGroup ๋ด์ ์ฌ๋ฌ Ingress์ ์ํด ์ ์๋ ๊ฒฝ์ฐ IngressGroup์ ์์์ ๋ฐ๋ผ ์ ์ฉ๋๋ค.
- ๊ธฐ๋ณธ๊ฐ:
listen-ports๊ฐ ์ง์ ๋์ง ์์ ๊ฒฝ์ฐ ์ธ์ฆ์๊ฐ ์ฌ์ฉ๋์ง ์์ผ๋ฉด ๊ธฐ๋ณธ๊ฐ์{"HTTP": 80}์ด๊ณ ์ธ์ฆ์๊ฐ ์ ๊ณต๋๋ฉด{"HTTPS": 443}์ด๋ค. - ๊ฒฝ๊ณ : ๋์ผํ ๊ทธ๋ฃน ๋ด์์๋ ์ค๋ณต๋ ๋ก๋ ๋ฐธ๋ฐ์ ํฌํธ๋ฅผ ๊ฐ์ง ์ ์๋ค. (์์ธ :
alb.ingress.kubernetes.io/group.order: 10์ง์ ) - ALB๊ฐ ๊ทธ๋ฃน์ ๋ชจ๋ Ingress์ ๋ํด ์ด๋ฌํ ์ค์ ์ ํตํฉํ๋ฏ๋ก IngressGroup ๋ด ํ๋์ Ingress์์
listen-ports๋ฅผ ์ ์ํ๋ ๊ฒ์ผ๋ก ์ถฉ๋ถํ๋ค.
- HTTP ํธ๋ํฝ์ด ๋ฆฌ๋๋ ์ ๋๋ ํฌํธ(์ผ๋ฐ์ ์ผ๋ก HTTPS ํฌํธ 443)๋ฅผ ์ง์ ํ์ฌ SSL ๋ฆฌ๋๋ ์ ์ ํ์ฑํํ๋ค.
- Example:
alb.ingress.kubernetes.io/ssl-redirect: '443' - SSL ๋ฆฌ๋๋ ์ (ssl-redirect)๋ IngressGroup์ ์ ์๋ ๊ฒฝ์ฐ ๊ทธ๋ฃน ๋ด์ ๋ชจ๋ Ingress์ ์ํฅ์ ์ค๋ค.
- SSL ๋ฆฌ๋๋ ์ ์ด ํ์ฑํ๋๋ฉด ๋ชจ๋ HTTP listener๋ ๊ธฐ๋ณธ์ ์ผ๋ก ๋ค๋ฅธ HTTP ๊ท์น์ ๋ฌด์ํ๊ณ HTTPS๋ก ๋ฆฌ๋๋ ์ ํ๋๋ก ๊ตฌ์ฑ๋๋ค.
-
alb.ingress.kubernetes.io/ip-address-type- ALB๊ฐ IPv4 ๋ฐ IPv6 ํธ๋ํฝ ์ง์์ ์ํด
ipv4๋๋dualstack์ ์ฌ์ฉํด์ผ ํ๋์ง ์ฌ๋ถ๋ฅผ ์ง์ ํ ์ ์๋ค. - Example:
alb.ingress.kubernetes.io/ip-address-type: ipv4 or dualstack - ipv4: IPv4 ์ฃผ์๋ง ์ฌ์ฉํ๋๋ก ALB๋ฅผ ๊ตฌ์ฑํฉ๋๋ค. ์ฆ, IPv4 ํธ๋ํฝ์ ๋ ์ ์ ์ผ๋ก ์ฒ๋ฆฌํ๋ค.
- dualstack: ALB๊ฐ IPv4 ๋ฐ IPv6 ํธ๋ํฝ์ ๋ชจ๋ ์ง์ํ ์ ์๋ค.
dualstack์ผ๋ก ์ค์ ๋ ๊ฒฝ์ฐ ALB๋ IPv4 ๋ฐ IPv6 ์ฃผ์๋ฅผ ๊ฐ๊ฒ ๋์ด ๋ ์ฃผ์ ์ ํ ๋ชจ๋์์ ํธ๋ํฝ์ ๋ผ์ฐํ ํ ์ ์๋ค.
- ALB๊ฐ IPv4 ๋ฐ IPv6 ํธ๋ํฝ ์ง์์ ์ํด
-
alb.ingress.kubernetes.io/customer-owned-ipv4-pool- Outpost ํ๊ฒฝ์ ์ฌ์ฉํ ๋ ALB์ ๋ํ ๊ณ ๊ฐ ์์ IPv4 ์ฃผ์ ํ์ ์ง์ ํ๋ค.
- ๊ฒฝ๊ณ : ์ด ์ฃผ์์ ๋ณ๊ฒฝํ ์ ์๋ค. ์ด๋ฅผ ๋ณ๊ฒฝํ๊ฑฐ๋ ์ ํํ๋ ค๋ฉด Ingress๋ฅผ ๋ค์ ์์ฑํด์ผ ํ๋ค.
- Example:
alb.ingress.kubernetes.io/customer-owned-ipv4-pool: ipv4pool-coip-xxxxxxx
-
alb.ingress.kubernetes.io/load-balancer-name- IngressGroup ๋ด์ ๋ชจ๋ Ingress๋ ๋์ผํ load balancer ์ด๋ฆ์ ์ฌ์ฉํด์ผ ํ๋ค.
- ์ด๋ฆ์ 32์๋ฅผ ์ด๊ณผํ ์ ์์ผ๋ฉฐ, ์ด๊ณผ ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
-
alb.ingress.kubernetes.io/target-type-
instance๋ชจ๋๋ ์๋น์ค๋ฅผ ์ํด ์ด๋ฆฐ NodePort์ ํด๋ฌ์คํฐ ๋ด ๋ชจ๋ ec2 ์ธ์คํด์ค๋ก ํธ๋ํฝ์ ๋ผ์ฐํ ํ๋ค. -
instance๋ชจ๋ ์ฌ์ฉ์์๋ ์๋น์ค๋ ๋ฐ๋์NodePortorLoadbalancertype์ ์ฌ์ฉํด์ผ ํ๋ค. -
ip๋ชจ๋๋ ๋ชจ๋ ํธ๋ํฝ์ pod๋ก ๋ผ์ฐํ ํ๋ค. - ๋คํธ์ํฌ ํ๋ฌ๊ทธ์ธ์ pod IP๊ฐ
ip๋ชจ๋๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ENI์ ๋ณด์กฐ IP ์ฃผ์๋ฅผ ์ฌ์ฉํด์ผ ํ๋ค. - amazon-vpc-cni-k8s
- sticky session์ด ์ ํ๋ฆฌ์ผ์ด์
๋ก๋ ๋ฐธ๋ฐ์์ ํจ๊ป ์๋ํ๋ ค๋ฉด
ip๋ชจ๋๊ฐ ํ์ํ๋ค. ip ๋ชจ๋๋ฅผ ์ฌ์ฉํ ๋ ์๋น์ค ์ ํ์ ์ค์ํ์ง ์๋ค.
-
-
alb.ingress.kubernetes.io/target-node-labels- ์ธ์คํด์ค ๋์ ์ ํ์ target group ๋ฑ๋ก์ ํฌํจํ ๋ ธ๋๋ฅผ ์ง์ ํ๋ค.
- Example:
alb.ingress.kubernetes.io/target-node-labels: label1=value1, label2=value2
-
alb.ingress.kubernetes.io/backend-protocol- ํธ๋ํฝ์ ํ๋๋ก ๋ผ์ฐํ ํ ๋ ์ฌ์ฉํ๋ ํ๋กํ ์ฝ์ ์ง์ ํ๋ค.
-
alb.ingress.kubernetes.io/backend-protocol-version- ํธ๋ํฝ์ ํฌ๋๋ก ๋ผ์ฐํ ํ๋ ๋ฐ ์ฌ์ฉ๋๋ ์ ํ๋ฆฌ์ผ์ด์ ํ๋กํ ์ฝ์ ์ง์ ํ๋ค. HTTP ๋๋ HTTPS๊ฐ ๋ฐฑ์๋ ํ๋กํ ์ฝ๋ก ์ฌ์ฉ๋ ๋๋ง ์ ํจํ๋ค.
- Example:
alb.ingress.kubernetes.io/backend-protocol-version: HTTP2alb.ingress.kubernetes.io/backend-protocol-version: GRPC
-
alb.ingress.kubernetes.io/actions.${action-name}- redirection ์์ ๊ณผ ๊ฐ์ด loadbalancer listener ๊ท์น์ ๊ตฌ์ฑํ๋ ๋ฐฉ๋ฒ์ ์ ๊ณตํ๋ค.
- annotation์ serviceName์ ingress rule์ serviceName๊ณผ ์ผ์นํด์ผ ํ๋ฉฐ, servicePort๋ ๋ฌด์กฐ๊ฑด
use-annotation์ ์ค์ผ ํ๋ค.
-
alb.ingress.kubernetes.io/conditions.${conditions-name}- ingress์ ํธ์คํธ/๊ฒฝ๋ก ์กฐ๊ฑด ์ธ์ ๋ผ์ฐํ ์กฐ๊ฑด์ ์ง์ ํ๋ ๋ฐฉ๋ฒ์ ์ ๊ณตํ๋ค.
- annotation์ serviceName์ ingress rule์ serviceName๊ณผ ์ผ์นํด์ผ ํ๋ฉฐ, servicePort๋ ๋ฌด์กฐ๊ฑด
use-annotation์ ์ค์ผ ํ๋ค.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: default
name: ingress
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/actions.rule-path1: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"Host is www.example.com OR anno.example.com"}}
alb.ingress.kubernetes.io/conditions.rule-path1: >
[{"field":"host-header","hostHeaderConfig":{"values":["anno.example.com"]}}]
alb.ingress.kubernetes.io/actions.rule-path2: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"Path is /path2 OR /anno/path2"}}
alb.ingress.kubernetes.io/conditions.rule-path2: >
[{"field":"path-pattern","pathPatternConfig":{"values":["/anno/path2"]}}]
alb.ingress.kubernetes.io/actions.rule-path3: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"Http header HeaderName is HeaderValue1 OR HeaderValue2"}}
alb.ingress.kubernetes.io/conditions.rule-path3: >
[{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "HeaderName", "values":["HeaderValue1", "HeaderValue2"]}}]
alb.ingress.kubernetes.io/actions.rule-path4: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"Http request method is GET OR HEAD"}}
alb.ingress.kubernetes.io/conditions.rule-path4: >
[{"field":"http-request-method","httpRequestMethodConfig":{"Values":["GET", "HEAD"]}}]
alb.ingress.kubernetes.io/actions.rule-path5: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"Query string is paramA:valueA1 OR paramA:valueA2"}}
alb.ingress.kubernetes.io/conditions.rule-path5: >
[{"field":"query-string","queryStringConfig":{"values":[{"key":"paramA","value":"valueA1"},{"key":"paramA","value":"valueA2"}]}}]
alb.ingress.kubernetes.io/actions.rule-path6: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"Source IP is 192.168.0.0/16 OR 172.16.0.0/16"}}
alb.ingress.kubernetes.io/conditions.rule-path6: >
[{"field":"source-ip","sourceIpConfig":{"values":["192.168.0.0/16", "172.16.0.0/16"]}}]
alb.ingress.kubernetes.io/actions.rule-path7: >
{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"200","messageBody":"multiple conditions applies"}}
alb.ingress.kubernetes.io/conditions.rule-path7: >
[{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "HeaderName", "values":["HeaderValue"]}},{"field":"query-string","queryStringConfig":{"values":[{"key":"paramA","value":"valueA"}]}},{"field":"query-string","queryStringConfig":{"values":[{"key":"paramB","value":"valueB"}]}}]
spec:
ingressClassName: alb
rules:
- host: www.example.com
http:
paths:
- path: /path1
pathType: Exact
backend:
service:
name: rule-path1
port:
name: use-annotation
- path: /path2
pathType: Exact
backend:
service:
name: rule-path2
port:
name: use-annotation
- path: /path3
pathType: Exact
backend:
service:
name: rule-path3
port:
name: use-annotation
- path: /path4
pathType: Exact
backend:
service:
name: rule-path4
port:
name: use-annotation
- path: /path5
pathType: Exact
backend:
service:
name: rule-path5
port:
name: use-annotation
- path: /path6
pathType: Exact
backend:
service:
name: rule-path6
port:
name: use-annotation
- path: /path7
pathType: Exact
backend:
service:
name: rule-path7
port:
name: use-annotation-
alb.ingress.kubernetes.io/scheme- AWS Application Load Balancer(ALB)์ ํจ๊ป Kubernetes Ingress ๊ตฌ์ฑ์์ ๋ก๋ ๋ฐธ๋ฐ์ Access ์ ํ์ ์ ์ํ๋ ๋ฐ ์ฌ์ฉํ๋ค. ์ด ์ฃผ์์ ALB๊ฐ ์ธํฐ๋ท ์ฐ๊ฒฐ(ํผ๋ธ๋ฆญ)์ธ์ง ๋ด๋ถ(ํ๋ผ์ด๋น)์ธ์ง ์ฌ๋ถ๋ฅผ AWS์ ์๋ ค์ค๋ค.
-
internet-facing: ์ธํฐ๋ท์ ํตํด ALB์ ๊ณต๊ฐ์ ์ผ๋ก ์ก์ธ์คํ ์ ์๋๋ก ํ๋ค. -
internal: ALB๊ฐ VPC ๋๋ ์ฐ๊ฒฐ๋ ๋คํธ์ํฌ ๋ด์์๋ง ์ก์ธ์ค ๊ฐ๋ฅํ๋๋ก ์ ํํ์ฌ ๋น๊ณต๊ฐ๋ก ๋ง๋ ๋ค.
-
alb.ingress.kubernetes.io/inbound-cidrs- ์ง์ ๋ IP ๋ฒ์(CIDR)๋ง ์ฐ๊ฒฐํ๋๋ก ํ์ฉํ์ฌ ALB์ ๋ํ ์ก์ธ์ค๋ฅผ ์ ํํ๋ค.
- ALB์ ์ก์ธ์คํ ์ ์๋ IP ๋ฒ์๋ฅผ ์ ํํ์ฌ ๊ฐ์ธ ์ ํ๋ฆฌ์ผ์ด์ ๋๋ ๋ด๋ถ ๋ฆฌ์์ค์ ๋ํ ์ก์ธ์ค๋ฅผ ์ ์ดํ๋ ๋ฐ ํนํ ์ ์ฉํ๋ค.
- Ingress๊ฐ IngressGroup์ ์ผ๋ถ์ธ ๊ฒฝ์ฐ
inbound-cidrs์ฃผ์์ ๊ทธ๋ฃน์ ๋ชจ๋ Ingress ๋ฆฌ์์ค์ ์ ์ฉ๋๋ค. - ๊ทธ๋ฌ๋
inbound-cidrs์ ํด๋น Ingress์ ์ ์๋ ํฌํธ์๋ง ์ ์ฉ๋๋ค. - ๋ฐ๋ผ์ ์ฌ๋ฌ ์ธ๊ทธ๋ ์ค๊ฐ ๋์ผํ ์์ ํฌํธ๋ฅผ ๊ณต์ ํ๋ ๊ฒฝ์ฐ ์ถฉ๋์ ๋ฐฉ์งํ๋ ค๋ฉด ํด๋น ์ธ๊ทธ๋ ์ค ์ค ํ๋์๋ง
inbound-cidrs์ ์ ์ํด์ผ ํ๋ค. - Ingress์์
alb.ingress.kubernetes.io/security-groups์ ์ง์ ํ๋ฉด inbound-cidrs ์ฃผ์์ด ๋ฌด์๋๋ค. -
inbound-cidrs์ฃผ์์ ์ง์ ํ์ง ์์ ๊ฒฝ์ฐ:- ALB์ IPAddressType ์ด ipv4๋ก ์ค์ ๋ ๊ฒฝ์ฐ 0.0.0.0/0 (๋ชจ๋ IPv4 ์ฃผ์)๊ฐ ํ์ฉ๋๋ค.
- ALB์ IPAddressType ์ด dualstack์ผ๋ก ์ค์ ๋ ๊ฒฝ์ฐ 0.0.0.0/0 ๋ฐ ::/0 (๋ชจ๋ IPv4 ๋ฐ IPv6 ์ฃผ์)๊ฐ ํ์ฉ๋๋ค.
-
alb.ingress.kubernetes.io/security-groups- ๋ก๋๋ฐธ๋ฐ์์ ์ฐ๊ฒฐํ ๋ณด์ ๊ทธ๋ฃน์ ์ง์ ํ๋ค.
- ํด๋น annotation์ด ์์ผ๋ฉด ์ปจํธ๋กค๋ฌ๊ฐ ์๋์ผ๋ก ํ๋์ ๋ณด์ ๊ทธ๋ฃน์ ์์ฑํ๊ณ ๋ณด์ ๊ทธ๋ฃน์ด ๋ก๋๋ฐธ๋ฐ์์ ์ฐ๊ฒฐ๋๋ฉฐ
inbound-cidrs๊ณผsecurity-group-prefix-lists์listen-ports์ก์ธ์ค๋ฅผ ํ์ฉํ๋ค. ๋ํ Node/Pod ๋ณด์ ๊ทธ๋ฃน์ ์ด ๋ณด์ ๊ทธ๋ฃน์์ ์ธ๋ฐ์ด๋ ํธ๋ํฝ์ ํ์ฉํ๋๋ก ์์ ํ๋ค. ์ฆ, ๋ด๊ฐ ์์ฑํ ๋ณด์๊ทธ๋ฃน์ Pod์ Node์ ์ ์ฉํ๊ณ ์ถ์ผ๋ฉด ์ฌ์ฉํ๋ฉด ๋๋ค. - Example:
alb.ingress.kubernetes.io/security-groups: sg-xxxx, nameOfSg1, nameOfSg2
-
alb.ingress.kubernetes.io/manage-backend-security-group-rules- ๋ณด์ ๊ทธ๋ฃน์ ์ง์ ํ ๋ ํธ๋ํฝ ์ก์ธ์ค๋ฅผ ์ํด ์ปจํธ๋กค๋ฌ๊ฐ Node/Pod์ ๋ณด์ ๊ทธ๋ฃน ๊ท์น์ ๊ตฌ์ฑํ ์ง ์ฌ๋ถ๋ฅผ ์ง์ ํ๋ค.
-
alb.ingress.kubernetes.io/security-groups์ ํตํด ๋ณด์ ๊ทธ๋ฃน์ ์ง์ ํ ๊ฒฝ์ฐ์๋ง ์ ์ฉ๋๋ค. - Example:
alb.ingress.kubernetes.io/manage-backend-security-group-rules: "true"