Containers in AKS cannot access Azure resources (Failed to resolve URL)

I have an API server (Python Flask) hosted on AKS. When the service starts, it:

  1. Access Azure key-vault to get storage account connection string
  2. use the connection string to perform CRUD jobs on Azure storage account

PS. The whole system consists of ingress(clusterIP & loadbalancer), service (clusterIP), and my flask API

Then I deploy it to AKS, which works fine (except that the CPU usage is usually > 100%). Two days later, I noticed that the server started restarting over and over again.

The error message looks like this:
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x7fc1f5e0c550>: Failed to resolve 'MY_KEY_VAULT.vault.azure.net' ([Errno -3] Temporary failure in name resolution)

At first, I thought it was caused by key vault, so I put the connection string directly in my code. And same thing happened again, Failed to resolve 'MY_STORAGE_ACCOUNT.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution

After my first deployment, I did nothing to my AKS resources. Below is basic info about my AKS:
enter image description here

One possible root cause is that I set auto upgrade to enable.

Please give me some suggestions for debugging, thanks!

  • 1

    Thank you for your question. Questions focused specifically on Kubernetes, such as configuring or deploying a cluster, may be better answered by the experts in either the Server Fault or DevOps. These platforms are highly knowledgeable in Kubernetes and can provide comprehensive support tailored to your needs. As a reminder, all questions on Stack Overflow must be specifically related to programming. We appreciate your understanding and encourage you to visit the “on-topic” pages of either site before posting there to ensure a more relevant and helpful response.

    – 

Leave a Comment