3

I have an nginx-ingress controller with the following config (in helm release):

controller:
  service:
    loadBalancerIP: "<my-public-ip>"

Public IP was created manually by myself. After I deleted the namespace in AKS I was a bit surprised to see that the public ip was gone as well, rendering all my DNS settings useless.

I assume this is a feature and not a bug in Azure Kubernetes Service, but is it perhaps possible to set a flag somewhere to not delete the public IP?

Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207

1 Answers1

3

Of course, I didn't meet this problem, and I tried it again, it also does not happen to me. But you can use the lock to prevent the delete action to the public IP. Here is the screenshot for the lock:

enter image description here

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • 1
    I am very not sure what caused it actually, but it was something from k8s, I saw it from audit logs. I cannot unfortunately tell exactly how it did happen, but it was some reconfiguration of nginx – Ilya Chernomordik Mar 03 '21 at 07:12
  • Thanks for the answer, I'll try it – Ilya Chernomordik Mar 03 '21 at 07:13
  • @IlyaChernomordik I use the chart with the URL "https://kubernetes.github.io/ingress-nginx" and it won't delete the public IP when deleting the namespace. Maybe you can try it. – Charles Xu Mar 03 '21 at 07:15
  • 1
    I do use the chart as well, and is probably not the namespace deletion that triggered it, but I am really not sure what... I use flux v2 that keeps track of all the applied manifests, perhaps it did delete something that triggered ip deletion... – Ilya Chernomordik Mar 03 '21 at 07:18
  • @IlyaChernomordik Yeah, I agree. There should be something else to trigger the delete. – Charles Xu Mar 03 '21 at 07:19