Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm Nginx Ingress - how to specify External IP in "helm install" command

I need to specify External IP that will be associated to Nginx service upon the Ingress Controller creation using the HELM install:

helm install nginx-ingress ingress-nginx/ingress-nginx -f internal-ingress.yaml 
--set controller.nodeSelector."beta\.kubernetes\.io/os"=linux 
--set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux

So I want to set statically EXTERNAL-IP address that can be seen upon this creation:

kubectl get services
NAME                                     TYPE          CLUSTER-IP   EXTERNAL-IP   PORT(S)                                     AGE

nginx-ingress-ingress-nginx-controller   LoadBalancer  10.0.36.81   10.33.27.35   80:31312/TCP,443:30653/TCP   5d

I need this because DNS configuration has already been set up for this IP and I would like to avoid this kind of configuration again.

like image 217
AndreyS Avatar asked Sep 11 '25 05:09

AndreyS


1 Answers

You can add flag to installation command:

 --set controller.service.loadBalancerIP=XXXX

where XXXX is static EXTERNAL IP you want to use. Remember that IP needs to be regional and in the same region as the cluster.

See: external-ip-ingress-controller.

like image 61
Malgorzata Avatar answered Sep 13 '25 00:09

Malgorzata