How to manage the nginx-ingress after installation?

11/1/2019

I used this article as reference to install my ingress on azure's cloud. https://docs.microsoft.com/pt-br/azure/aks/ingress-tls

But now I have some questions about it, how to manage that,like: On this step I installed my nginx-ingress:

helm install stable/nginx-ingress \ --namespace ingress-basic \ --set controller.replicaCount=2 \ --set controller.nodeSelector."beta\.kubernetes\.io/os"=linux \ --set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux \ --set name=MY_RELEASE_NAME After that I had a LoadBalancer and a ClusterIP created and I must update manually my FQDN with the Public IP provided(azure provides)! e.g: az network public-ip update --ids $PUBLICIPID --dns-name $DNSNAME

Is there any risk of this controller be destroyed and I lose my public IP and then have to create everything manually again? If the answer is YES, how to do? Create a new job on azure to update it automatically? Does anyone know a sample of that?

-- Paulo Sérgio Vieira
azure
kubernetes
kubernetes-ingress
nginx-ingress

2 Answers

11/3/2019

Have you tried provisioning a static IP first? Then, using the official helm chart, you can use it like the following.

service.loadBalancerIP = YOUR_AZURE_STATIC_IP

Also, you may be interested in https://github.com/weaveworks/flux. It is a great tool to manage helm releases the GitOps way.

-- john
Source: StackOverflow

11/1/2019

Follow the below steps

  1. Create a public ip to be used as LoadBalancer Ip address using azure CLI. choose it as static ip
  2. Create nginx YAML template using helm template command ( replace install with template in your command )
  3. Update the nginx service type as LoadBalancer and update the LoadBalancer ip from step 1 in the template generated in step2 above
  4. Deploy the helm template YAML
-- P Ekambaram
Source: StackOverflow