Azure-docs: Clarify the lifecycle of the public IP address

Created on 7 Feb 2020  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

The page states that "The static public IP address remains if the ingress controller is deleted.". However I've noticed that if I delete the AKS resource itself, this also deletes the public IP address and the entire nodepool resource group. Is there any way around this in order to decouple the public IP from the lifecycle of the AKS cluster? Is it possible to create the static public IP in a different resource group, for instance?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 assigned-to-author container-servicsvc product-question triaged

All 7 comments

@joelw
Thanks for the question! We are investigating and will update you shortly.

i think you can create the public ip in a separate resource group.

In that case you need to give the access for service principal of AKS to that public ip.

Try this if you can. Else i will try in my env and let you know.

While deleting the aks cluster, The whole MC_* resource group is deleted. So all the resources in them are deleted.

Also, there is another way to always keep the DNS label without being removed. It would be great it you could update the information in here!
It was already detected by some people in GitHub and the solution is the following:

To preserve the DNS label of a public IP in use by a cluster service do the following:

  1. Use the kubectl edit svc command to edit the manifest of the svc: Kubectl edit svc -n
  2. This command opens the manifest in Notepad, add the following annotation "service.beta.kubernetes.io/azure-dns-label-name: YourDnsName"
  3. Close the Notepad, and it saves the modification automatically
  4. When you do an upgrade/update the DNS label will not be removed

In order to do with Helm, as per below documentation, it could be:

Use Helm to deploy an NGINX ingress controller:
helm install nginx-ingress 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 controller.service.loadBalancerIP="40.121.63.72" \
--set controller.service.annotations."service.beta.kubernetes.io/azure-dns-label-name"="dnsName"

@joelw Thanks for the feedback.
I will assign this issue to the content author to investigate further and update the document as appropriate.

i think you can create the public ip in a separate resource group.

In that case you need to give the access for service principal of AKS to that public ip.

Try this if you can. Else i will try in my env and let you know.

While deleting the aks cluster, The whole MC_* resource group is deleted. So all the resources in them are deleted.

@jakaruna-MSFT: Have you already tried that in your environment? I just came across the same error when trying to create a new ingress controller based on an existing public IP address in a resource group other than the ones with the AKS nodes.

Thank you @joelw for the feedback.

I have updated the article to address your feedback and the changes should be available soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spottedmahn picture spottedmahn  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments

varma31 picture varma31  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

DeepPuddles picture DeepPuddles  Â·  3Comments