[BUG] Internal error occurred: failed calling webhook "mutation.azure-workload-identity.io": failed to call webhook.
Describe the bug After last night automatic Node OS upgrade on AKS cluster, the app workload-identity seems broken. Every new replicaset workload using label azure.workload.identity/use: 'true'
returns the following error:
Internal error occurred: failed calling webhook "mutation.azure-workload-identity.io": failed to call webhook: Post "https://azure-wi-webhook-webhook-service.kube-system.svc:443/mutate-v1-pod?timeout=10s": EOF
Expected behavior Workload identity should reply to endpoint as per specification. Pod should get its azure identity/token.
Environment (please complete the following information):
- Kubernetes version 1.27.9
- workload id: 1.2.0 ( uses mcr.microsoft.com/oss/azure/workload-identity/webhook:v1.2.0)
Additional context We have several clusters, even in the same region as the faulty one, yet the problem just happened on one of them. To me seems related to a failed upgrade procedure.
Any troubleshooting help? We are already in contact w/ Azure support yet they seem a bit lost/unresponsive
Any updates on this issue? I am facing the same error with the following setup:
Kubernetes version 1.28.5 workload id: 1.2.0 ( uses mcr.microsoft.com/oss/azure/workload-identity/webhook:v1.2.0)
Issue is intermittent on a single cluster. This is a brand new cluster created with AzureLinux OS with Cilium and Azure CNI Overlay network configurations
I am facing this exact same issue in 2 production cluster at 1.28.5 in AEA and CUS. We cannot have KEDA enabled at present due to this issue.
Facing the same issue here. I was just following the guide on https://learn.microsoft.com/en-us/azure/aks/csi-secrets-store-identity-access and encountered this (linebreaks and nesting added for legibility):
Error from server (InternalError): error when creating "STDIN":
Internal error occurred: failed calling webhook "mutation.azure-workload-identity.io":
failed to call webhook: Post "https://azure-wi-webhook-webhook-service.kube-system.svc:443/mutate-v1-pod?timeout=10s":
http: server gave HTTP response to HTTPS client
try upping the memory, I was getting OOMKills on the pods: This worked for me:
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 2Gi
Any update on this? I'm seeing it for 1.27.7 in AEA, and is preventing Keda from working, (same as @markatky46 ). I've had to disable.
I'm getting this Issue in Version 1.26.12 as well
@fsismondi : For information we had the same issue on one of our AKS cluster with VNET Integration enabled.
We had a faulty NSG rule that was blocking part of the exchange between the node subnet and the aks api subnet.
If you have intermittent issue of this type, verify that there is not a firewall rule somewhere (NSG) that's blocking access to this webservice, maybe only on some nodes/pools/subnets if you have a distributed cluster.
Best regards,
For the record, after 14 days from the incident, Azure support replied that this is a know issue and that "The issue is mitigated simply by restarting first by konnectivity-agents"
If only we have had this information back then it would have avoided a lot of headaches to our operations team and more importantly to our customers.
What a joke Azure/AKS support team is :clown_face:
@fsismondi Thanks for this suggestion, we were running into the same issue and your solution helped us.
same
The problem is occurring on my AKS cluster with version 1.30.5. The proposed workaround to restart konnectivity-agents doesn't work in my case.
1.30.7 too
In my case, it was due to an outage in the region of my cluster, and that outage lasted 3 days. After that, everything was working again like a charm.
Same error for us for some time now.
I think that this issue sholud be reopened as this problem still exists.
This is breaking production AKS clusters each week when upgrades occur (os image and/or k8s upgrade version).
Restart the konnectivy pods is not an acceptable solution.
This problem also occurs in my production AKS cluster. I have the same opinion that restarting the konnectivy pods is not an acceptable solution.
I was able to resolve it by doing this:
- Reconcile aks by executing:
az aks update - Scaling down konnectivity-agent and azure-wi-webhook-controller-manager
- Scaling both back up
I initially tried restarting konnectivity-agent per recommendations above, but had no luck. Executing "az aks update" by itself didn't seem to fix it either.
Maybe az aks update was the solution and it just took time. But after executing it i still was seeing the issue until i scaled down and back up those 2.
Same here, deployed a new cluster on version 1.28.5 and after checking if workload identity is working I found out it is not.
I am using the AGIC Controller which uses Workload Identity, but it fails due to the reason the workload identity webhook is responding in http on the https client.
If the above is true I will try to deploy a new AKS-cluster with a higher version! Will update my progress here tomorrow.
Same here, deployed a new cluster on version 1.28.5 and after checking if workload identity is working I found out it is not.
I am using the AGIC Controller which uses Workload Identity, but it fails due to the reason the workload identity webhook is responding in http on the https client.
If the above is true I will try to deploy a new AKS-cluster with a higher version! Will update my progress here tomorrow.
I have removed my cluster and created a new one with the version: 1.30.9
These are the errors I encounter when I check the AGIC Controller to authenticate to the AAD Workload Identity:
"mutation.azure-workload-identity.io": failed to call webhook: Post "https://azure-wi-webhook-webhook-service.kube-system.svc:443/mutate-v1-pod?timeout=10s": http: server gave HTTP response to HTTPS client
107s Warning FailedCreate replicaset/agic-controller-ingress-azure-7d7bb7c44f Error creating: Internal error occurred: failed calling webhook "mutation.azure-workload-identity.io": failed to call webhook: Post "https://azure-wi-webhook-webhook-service.kube-system.svc:443/mutate-v1-pod?timeout=10s": context deadline exceeded
Hi.
We are on 1.30.9 AKS version, facing same issue.
Warning FailedCreate
I found out that the NSG of the AKS Managed Resource Group was the issue in my case. I had a rule blocking network traffic.
For others in this thread, please check the NSG in the Managed Resource Group of AKS.