简体   繁体   中英

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM