Forum Discussion

Han_Shih's avatar
Han_Shih
Copper Contributor
Nov 12, 2023

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:

 

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

Please give me some suggestions for debugging, thanks!

 

[Update -1]

I deploy same container to another node pool. Things works fine ...

 

 

2 Replies

    • Han_Shih's avatar
      Han_Shih
      Copper Contributor
      As I mentioned above, even I put storage account connection string directly into my code, it failed.
      Besides, I deploy same container to another node pool. Things works fine ...

Resources