[BUG] aks-node-ca-watcher cannot run
Describe the bug After k8s cluster reconfiguration one of nodes cannot run pod daemonset custom-ca-trust. Pod throws an error "Container image "mcr.microsoft.com/aks/aks-node-ca-watcher:static" is not present with pull policy of Never"
To Reproduce Steps to reproduce the behavior:
- Custom Ca certificates should be enabled. And that is all that I can say. Seems that issue is not easy reproduceable.
Environment (please complete the following information):
- AKS 1.27.7
@pawellrus - is this happening on a node that was created a while ago, but didn't have the feature enabled initially after creation? If yes, can you attempt to perform a node image upgrade on that node and see if this helps with the issue?
@pawellrus - is this happening on a node that was created a while ago, but didn't have the feature enabled initially after creation? If yes, can you attempt to perform a node image upgrade on that node and see if this helps with the issue?
thank you for advice. I will try to perform node image upgrade in maintenance window.
Node image upgrade helped. Thank you @UtheMan
We are seeing the same issue after an automatic node image upgrade on 2 of our clusters. One since around 8 hours ago, the other since 3d12h.
One cluster is on k8s version 1.30.4, the other is on k8s version 1.29.9. Both using AzureLinux (AKSAzureLinux-V2gen2-202409.23.0) as the node image on all node pools. The issue is on all nodes in all node pools in both clusters. Both have had CustomCATrustPreview enabled on all nodes since they were created.
It looks to me like this container image needs to be preloaded on the node, which it was before but since the restart it's not (please correct me if I'm wrong).
Perhaps this information helps to pinpoint the issue. If I can do anything to help testing that's fine, I can do some non-destructive work on one of our clusters.
I encountered the same issue as fester-io. Need this fixed ASAP.
I am encountering the this as well and thus I am unable to spin up new nodes. Is there an ETA on fixing this?
We're looking into this issue, will post updates here asap.
I identified the issue and submitted a fix. As a short term mitigation, you can re-tag the image on your nodes like so:
ctr --namespace k8s.io image tag mcr.microsoft.com/aks/aks-node-ca-watcher:master.240820.1 mcr.microsoft.com/aks/aks-node-ca-watcher:static
This would have to be ran on every affected node, so ideally it would be triggered using a daemonset.
Thanks for the recommendation that fixed our issue. Here is the daemonset that I deployed to update the each of the host:
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: host-command-ctr
labels:
k8s-app: host-command-ctr
annotations:
command: &cmd apt-get update -qy && apt-get install -qy open-iscsi xfsprogs && ctr --namespace k8s.io image tag mcr.microsoft.com/aks/aks-node-ca-watcher:master.240820.1 mcr.microsoft.com/aks/aks-node-ca-watcher:static --force
spec:
selector:
matchLabels:
k8s-app: host-command-ctr
template:
metadata:
labels:
k8s-app: host-command-ctr
spec:
hostNetwork: true
hostPID: true
initContainers:
- name: init-node
command:
- nsenter
- --mount=/proc/1/ns/mnt
- --
- sh
- -c
- *cmd
image: alpine:3
securityContext:
privileged: true
containers:
- name: wait
image: k8s.gcr.io/pause:3.1
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
- effect: NoSchedule
operator: Exists
updateStrategy:
type: RollingUpdate
Thanks this fixed it for us.
The issue seems to be coming back for us. Is anyone else facing the same problem?
@rickardk-se could you share which node image version you are using on the nodes that started seeing the issue again? Were they perhaps updated to 2024.09.30 image version? Please see here for some more details: https://github.com/Azure/AKS/issues/4586
@UtheMan yes it was updated to 2024.09.30. Thanks.
Action required from @aritraghosh, @julia-yin, @AllenWen-at-Azure
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads