I have 1 question regarding migration from Nginx controller to ALB. Does k8s during migration will create a new ingress controller and switch smoothly services to new ingress or will delete an old one and after that will create a new ingress? Why I ask that, because we want to change ingress class and we would like to minimize any downtime. Sorry for newbie question, because I didn't find any answer in doc
CodePudding user response:
- First, when transitioning from one infrastructure to another, it's best to pre-build the new infrastructure ahead of the transition so it will be ready to be changed.
- In this specific example, you can set up the two IngressClasses to exist in parallel, and create the new ALB ingress with a different domain name.
- In the transition moment, change the DNS alias record (directly or using annotations) to point at the new ALB ingress and delete the older Nginx ingress.
- In general, I recommend managing the ALB not as ingress from K8s, but as an AWS resource in Terraform/CloudFormation or similar and using TargetGroupBindings to connect the ALB to the application using its K8s Services. https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/guide/targetgroupbinding/targetgroupbinding/