-
Notifications
You must be signed in to change notification settings - Fork 255
Trying to use Pod Identity fails a number of times, before finally succeeding #181
Comments
Can you please confirm that you are using the latest release: https://github.com/Azure/aad-pod-identity/releases/tag/1.3.0-mic-1.4.0-nmi ? |
@woutervanvliet - there were bug fixes which has gone in the latest release - https://github.com/Azure/aad-pod-identity/releases/tag/1.3.0-mic-1.4.0-nmi which would avoid a condition where identities would get deleted and then re added again even thought they are not required to be deleted. Hence want to first confirm that you are using latest to further debug this. |
@kkmsft Sorry for the delay - been off from work. Yes, it appears like I'm using the latest version. My mic pod looks like this
And nmi
|
There is a bit of an avoidable race condition where if you created your identities, binding, pods at the same time mic will be churning through the assignment but the pod actually started and nmi got no assignment for it. This situation is not avoidable. not without adding I will add it to our next release work. |
I am hitting this issue as well where the pod restarts 5~6 times before successfully getting an access token. I see that the race condition is unavoidable and that there has been perf improvements - how can I use the latest code to test this out? We are currently using https://github.com/Azure/aad-pod-identity/releases/tag/1.3.0-mic-1.4.0-nmi |
Intro: I'm trying to get Azure Pod Identity to work in our cluster, and am mostly succeeding (so far so good). For the time being, we have two keyvaults, two AzureIdentity's, two AzureIdentityBinding's and two Pods using each their keyvault.
While testing, both pods are equal - only difference being their
aadpodidbinding
and an environment variable indicating what keyvault to use. At startup, the pod connects to the KeyVault, reads two values and prints them withConsole.WriteLine
. If the connection fails, the pod will crash and k8s will restart it.The problem: One pod might startup being able to read from the keyvault immediately, while the other will crash and restart for - what seems to be - rather consistently 5 times before being able to get an access token.
When it fails, the following Exception is thrown:
The behaviour is similar when using FlexVolume (which eventually one group of our pods will use in production), but I find it easier to relate to the error with two equal pods.
While waiting for the pod to succeed, I'm seeing both "binding removed" and "binding applied" messages in mic's log.
My questions:
Sourcecode:
Program.cs
KeyVaultConfiguration.cs.cs
Any help, hints or ideas are much appreciated.
Note: I've asked this same question on Stack Overflow https://stackoverflow.com/questions/55451111/trying-to-use-azure-pod-identity-fails-a-number-of-times-before-finally-succeed
The text was updated successfully, but these errors were encountered: