January 2019
Intermediate to advanced
484 pages
11h 48m
English
Let's create an internal load balancer for the previous nginx pod. In order to use an internal load balancer, you need to add an annotation (service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0), as follows:
$ cat internal-elb.yamlapiVersion: v1kind: Servicemetadata: name: nginx annotations: service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0spec: ports: - protocol: TCP port: 80 type: LoadBalancer selector: project: devops-with-kubernetes app: nginx$ kubectl create -f internal-elb.yaml service "nginx" created
Then, the EKS Cloud provider will create and configure a classic ELB as in the following screenshot:
Since it's an internal ELB, you can't gain access to the ELB from outside of the AWS ...
Read now
Unlock full access