EKS - ALB Controller 를 활용한 NLB 생성

목차

참고

apiVersion: v1
kind: Service
metadata:
name: nlb-sample-service
namespace: nlb-sample-app
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: external
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-name: skcc-prd-vitality-dx-nlb-ftp
service.beta.kubernetes.io/subnets: <Public Subnet1 ID>, <Public Subnet2 ID>
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
type: LoadBalancer
selector:
app: nginx
apiVersion: apps/v1
kind: Deployment
metadata:
name: nlb-sample-app
namespace: nlb-sample-app
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: public.ecr.aws/nginx/nginx:1.21
ports:
- name: tcp
containerPort: 80
Share