When does Kubernetes automatically re create AWS ELB

3/27/2019

I am using Helm to deploy a k8s cluster onto AWS EKS.

My k8s cluster uses:

  1. One LoadBalancer service. We explicitly sets this ELB to AWS Network ELB using an annotation provided by aws docs.
  2. Two ingresses controlled by an alb-ingress-controller. When deployed, two AWS Application ELBs are created.

My question:

After running helm upgrade --install --force... to install the charts for the first time, issuing following helm upgrade --install --force...s sometimes result in new ELBs being created.

I want to learn more about this behavior between re deploying k8s resources onto an existing resources and ELB re-creation.

Official documents about when aws ELBs are recreated when they're used with k8s are most appreciated.

-- Tran Triet
aws-eks
aws-elb
kubernetes
kubernetes-helm

1 Answer

3/27/2019

I am using Helm to deploy a k8s cluster onto AWS EKS

Note: You don't use Helm to deploy a cluster, you use it to deploy applications/workloads/resources to a Kubernetes cluster.

I want to learn more about this behavior between re deploying k8s resources onto an existing resources and ELB re-creation.

There shouldn't be a recreation of a new ELB/NLB/ALB on redeploying a helm chart if the LoadBalancer services are unmodified if you are using helm upgrade ...

The only reason why the load balancers could be recreated is if you are using something like helm install --replace or if you are deleting the helm chart in the cluster (helm delete ...) and all the ELB/NLB/ALB resources are not being deleted (maybe an operator created them? or there was failure call the AWS API?) and then you run again a helm install.

Keep in mind that the standard convention for changes in a cluster is to use helm upgrade if you are changing any values. If you run helm install on top of an existing chart with the same name you should get an error (without the --replace option)

-- Rico
Source: StackOverflow