1.Introduction
EKS에서 3종류의 Service Types 이 있습니다.
- Cluster IP: Service를 cluster-internal IP address로 노출합니다. (즉 Cluster 내부 IP)
- Node Port: Node의 IP주소에 특정 port로 서비스를 노출합니다.
- LoadBalancer: Load balancer를 이용해서 서비스를 실제 외부로 노출 시킵니다.
Load Balancer를 사용해서 expose시키는 것은 EC2 nodes위에서 돌아가는 pods에 적용이 가능합니다.
만약 AWS Fargate를 사용시 Load Balancer를 사용할수 없고, ALB Ingress Controller 를 사용해야 합니다.
2. Nginx Tutorial
2.1 Deployment 생성하기
vi nginx-deployment.yaml
로 deployment를 생성합니다.
2.2 Cluster IP Service
http://localhost:5000 에서 확인합니다.
2.3 NodePort Service
http://localhost:5000 에서 확인합니다.
2.4 Load Balancer Service
확인은 다음과 같이 합니다.