[Question] What is happening in AKS when the status is RotatingServiceAccountSigningKeysInternal ?
Describe scenario We have an AKS cluster that we planned an update the version of the control plane from 1.26.3 -> 1.27.3 today, but when we tried to do the upgrade it was rejected with the message.
Failed to save Kubernetes service '<CLUSTER NAME>'. Error: Operation is not allowed: Another operation (RotatingServiceAccountSigningKeysInternal) is in progress, please wait for it to finish before starting a new operation. See https://aka.ms/aks-pending-operation for more details
We have tried to find information about this status code, but we cannot find anything what AKS does when the status is RotatingServiceAccountSigningKeysInternal. The closest we have found that workload identity has some key rotation every three months which may be connected since we started this cluster 23th of May..
Question
So; can you tell us what happens when the AKS has the status RotatingServiceAccountSigningKeysInternal and for how long we can expect it to run? How can we monitor the progress of this operation?
This has started happening on some of our clusters and so far has been running for hours. Did yours complete?
@andywhitt This has started happening on some of our clusters and so far has been running for hours. Did yours complete?
No, its still running...
Our clusters have also started to exhibit this, we reckon it first started to occur last week at some point, so far every case has required a support ticket to be opened with Microsoft and they have then 'reconciled' something on the backend which has brought the cluster back to a state where we can interact with it but even then, in one clusters case, a day later it entered back into this state and is currently sat there trying to complete.
Your creation date is interesting as ours was created around that time as well and is also making use of Azure Workload Identity.
Looking at the logs from the Azure Workload Identity namespace I can see this {"level":"info","timestamp":"2023-10-24T09:07:31.342411Z","logger":"cert-rotation","caller":"/go/pkg/mod/github.com/open-policy-agent/[email protected]/pkg/rotator/rotator.go:271$rotator.(*CertRotator).refreshCertIfNeeded.func1","message":"no cert refresh needed"} - which is probably about the time the RotatingServiceAccountSigningKeysInternal started
Does yours show this?
Looking at the logs from the Azure Workload Identity namespace I can see this {"level":"info","timestamp":"2023-10-24T09:07:31.342411Z","logger":"cert-rotation","caller":"/go/pkg/mod/github.com/open-policy-agent/[email protected]/pkg/rotator/rotator.go:271$rotator.(*CertRotator).refreshCertIfNeeded.func1","message":"no cert refresh needed"} - which is probably about the time the RotatingServiceAccountSigningKeysInternal started
Does yours show this?
![]()
I don't get any such message in my pod logs... However I can see a message that actually indicates that it has gotten its certificates updated...
Here is my pod logs:
Pod 1
{"level":"info","timestamp":"2023-10-23T12:21:51.969169Z","logger":"entrypoint","caller":"/workspace/main.go:99$main.mainErr","message":"initializing metrics backend","backend":"prometheus"}
{"level":"info","timestamp":"2023-10-23T12:21:51.969352Z","logger":"entrypoint","caller":"/workspace/main.go:105$main.mainErr","message":"setting up manager","userAgent":"azure-workload-identity/webhook/v1.1.0 (linux/amd64) 656a033/2023-05-08-20:13"}
{"level":"info","timestamp":"2023-10-23T12:21:58.091039Z","caller":"/go/pkg/mod/k8s.io/[email protected]/rest/request.go:690$rest.(*throttledLogger).Infof","message":"Waited for 1.044563317s due to client-side throttling, not priority and fairness, request: GET:https://aks-<dns>.hcp.westeurope.azmk8s.io:443/apis/image.toolkit.fluxcd.io/v1beta2?timeout=32s"}
{"level":"info","timestamp":"2023-10-23T12:21:58.345950Z","logger":"controller-runtime.metrics","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/metrics/listener.go:44$metrics.NewListener","message":"Metrics server is starting to listen","addr":":8095"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346213Z","logger":"entrypoint","caller":"/workspace/main.go:191$main.setupProbeEndpoints","message":"added healthz and readyz check"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346265Z","logger":"entrypoint","caller":"/workspace/main.go:146$main.mainErr","message":"starting manager"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346359Z","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:369$manager.(*controllerManager).httpServe.func1","message":"Starting server","path":"/metrics","kind":"metrics","addr":"[::]:8095"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346383Z","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:369$manager.(*controllerManager).httpServe.func1","message":"Starting server","kind":"health probe","addr":"[::]:9440"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346627Z","logger":"entrypoint","caller":"/workspace/main.go:162$main.setupWebhook","message":"registering webhook to the webhook server"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346621Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:217$webhook.(*Server).Start","message":"Starting webhook server"}
{"level":"info","timestamp":"2023-10-23T12:21:58.346792Z","logger":"controller-runtime.webhook","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:149$webhook.(*Server).Register","message":"Registering webhook","path":"/mutate-v1-pod"}
{"level":"info","timestamp":"2023-10-23T12:21:58.348522Z","logger":"controller-runtime.certwatcher","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/certwatcher/certwatcher.go:131$certwatcher.(*CertWatcher).ReadCertificate","message":"Updated current TLS certificate"}
{"level":"info","timestamp":"2023-10-23T12:21:58.348652Z","logger":"controller-runtime.webhook","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:271$webhook.(*Server).Start","message":"Serving webhook server","host":"","port":9443}
{"level":"info","timestamp":"2023-10-23T12:21:58.348684Z","logger":"controller-runtime.certwatcher","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/certwatcher/certwatcher.go:85$certwatcher.(*CertWatcher).Start","message":"Starting certificate watcher"}
Pod 2
{"level":"info","timestamp":"2023-10-23T12:22:42.488096Z","logger":"entrypoint","caller":"/workspace/main.go:99$main.mainErr","message":"initializing metrics backend","backend":"prometheus"}
{"level":"info","timestamp":"2023-10-23T12:22:42.488209Z","logger":"entrypoint","caller":"/workspace/main.go:105$main.mainErr","message":"setting up manager","userAgent":"azure-workload-identity/webhook/v1.1.0 (linux/amd64) 656a033/2023-05-08-20:13"}
{"level":"info","timestamp":"2023-10-23T12:22:48.584378Z","caller":"/go/pkg/mod/k8s.io/[email protected]/rest/request.go:690$rest.(*throttledLogger).Infof","message":"Waited for 1.044251729s due to client-side throttling, not priority and fairness, request: GET:https://aks-<dns>.hcp.westeurope.azmk8s.io:443/apis/apiextensions.k8s.io/v1?timeout=32s"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840460Z","logger":"controller-runtime.metrics","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/metrics/listener.go:44$metrics.NewListener","message":"Metrics server is starting to listen","addr":":8095"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840661Z","logger":"entrypoint","caller":"/workspace/main.go:191$main.setupProbeEndpoints","message":"added healthz and readyz check"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840688Z","logger":"entrypoint","caller":"/workspace/main.go:146$main.mainErr","message":"starting manager"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840765Z","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:369$manager.(*controllerManager).httpServe.func1","message":"Starting server","path":"/metrics","kind":"metrics","addr":"[::]:8095"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840813Z","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:369$manager.(*controllerManager).httpServe.func1","message":"Starting server","kind":"health probe","addr":"[::]:9440"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840847Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:217$webhook.(*Server).Start","message":"Starting webhook server"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840859Z","logger":"entrypoint","caller":"/workspace/main.go:162$main.setupWebhook","message":"registering webhook to the webhook server"}
{"level":"info","timestamp":"2023-10-23T12:22:48.840957Z","logger":"controller-runtime.webhook","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:149$webhook.(*Server).Register","message":"Registering webhook","path":"/mutate-v1-pod"}
{"level":"info","timestamp":"2023-10-23T12:22:48.841831Z","logger":"controller-runtime.certwatcher","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/certwatcher/certwatcher.go:131$certwatcher.(*CertWatcher).ReadCertificate","message":"Updated current TLS certificate"}
{"level":"info","timestamp":"2023-10-23T12:22:48.841883Z","logger":"controller-runtime.webhook","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:271$webhook.(*Server).Start","message":"Serving webhook server","host":"","port":9443}
{"level":"info","timestamp":"2023-10-23T12:22:48.841942Z","logger":"controller-runtime.certwatcher","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/certwatcher/certwatcher.go:85$certwatcher.(*CertWatcher).Start","message":"Starting certificate watcher"}
{"level":"debug","timestamp":"2023-10-23T12:23:38.968160Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"e6435453-a1f8-4381-a12a-3543d505bd14","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:38.978708Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"ee55b6dc-e9f2-4fa7-a758-136034ed7408","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:39.089983Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"ee55b6dc-e9f2-4fa7-a758-136034ed7408","allowed":true}
{"level":"debug","timestamp":"2023-10-23T12:23:39.090197Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"e6435453-a1f8-4381-a12a-3543d505bd14","allowed":true}
{"level":"debug","timestamp":"2023-10-23T12:23:39.093235Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"02103f86-547b-4eee-903e-48164668bae4","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:39.093966Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"02103f86-547b-4eee-903e-48164668bae4","allowed":true}
{"level":"debug","timestamp":"2023-10-23T12:23:39.154046Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"e755b5c9-ac04-4bb1-b70b-0d8806fc31ed","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:39.154811Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"e755b5c9-ac04-4bb1-b70b-0d8806fc31ed","allowed":true}
{"level":"debug","timestamp":"2023-10-23T12:23:40.379848Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"c12b30cd-62cb-4d89-a7ee-74000dac1824","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:40.380585Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"c12b30cd-62cb-4d89-a7ee-74000dac1824","allowed":true}
{"level":"debug","timestamp":"2023-10-23T12:23:40.756841Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"48d2d411-9e8f-4be8-b328-21aea077b83d","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:40.757969Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"48d2d411-9e8f-4be8-b328-21aea077b83d","allowed":true}
{"level":"debug","timestamp":"2023-10-23T12:23:40.998070Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:96$admission.(*Webhook).ServeHTTP","message":"received request","webhook":"/mutate-v1-pod","UID":"0c393323-fa09-4e96-8402-7b911e1b0159","kind":"/v1, Kind=Pod","resource":{"group":"","version":"v1","resource":"pods"}}
{"level":"debug","timestamp":"2023-10-23T12:23:40.999308Z","logger":"controller-runtime.webhook.webhooks","caller":"/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:143$admission.(*Webhook).writeAdmissionResponse","message":"wrote response","webhook":"/mutate-v1-pod","code":200,"reason":"","UID":"0c393323-fa09-4e96-8402-7b911e1b0159","allowed":true}
An update of today; 3 of our 4 clusters has now gotten this issue. So it seems that the problem is escalating.
Further analysis seems that this is connected to the managed identity on the cluster it self, not workflow identity. We are running system-assigned managed identity, so we don't have any control of this rotation. And that the automatic key rotation that should happen automatically is stuck...
We have tried to run these two commands (one on each of our dev/test clusters) as suggested in circumstances with stuck AKS clusters.
az aks update -n <aks-cluster> -g <aks-resource-group>
az aks upgrade -n <aks-cluster> -g <aks-resource-group> --kubernetes-version 1.27.3 --control-plane-only
But we got an error as stated below and now these clusters are stuck in updating.
(NotLatestOperation) Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been saved yet).
Code: NotLatestOperation
Message: Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been saved yet).
EDIT: The two clusters has now status Succeeded (Running however, both of them has both Start and Stop button disabled... I did start a question on Microsoft Q/A today was well here with more response... We have also contacted Azure support...
New update: It is currently back in running state.
I got a comment from Microsoft on the referenced URL that indicates that there is an ongoing issue, I don't know if that is related and that it may have resolved this issue.
I will close this issue now and continue on the QA post any further discussions...