Home > Software engineering >  How to update kubelet version on Fargate pods in an AWS EKS cluster?
How to update kubelet version on Fargate pods in an AWS EKS cluster?

Time:08-31

I updated the Kubernetes version of the control plane of my EKS cluster to 1.20, but want to update to 1.21. However, I get

Kubelet version of Fargate pods must be updated to match cluster version 1.20 before updating cluster version; Please recycle all offending pod replicas

Of course I get a similar errro with eksctl

$ eksctl upgrade cluster --name sandbox --approve
2022-08-30 14:46:34 [ℹ]  will upgrade cluster "sandbox" control plane from current version "1.20" to "1.21"
Error: operation error EKS: UpdateClusterVersion, https response error StatusCode: 400, RequestID: 7845750b-e906-4814-a38c-466e6dab8864, InvalidRequestException: Kubelet version of Fargate pods must be updated to match cluster version 1.20 before updating cluster version; Please recycle all offending pod replicas

How do I update the kubelet version on Fargate pods?

CodePudding user response:

You can update the kubelet version on Fargate pods by using the following command:

kubectl patch daemonset fargate-ds --type=json --patch='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "k8s.gcr.io/fargate-amd64:v1.21.0"}]'

CodePudding user response:

Please recycle all offending pod replicas

Do a kubectl rollout restart to workload controller (eg. deployment, statefulset) that managed those pods currently running on Fargate. This will replace your current Fargate node with a kubelet version same as the control plane. For standalone pod just delete and re-apply.

  • Related