Skip to content

How can I prevent kubelet, kubeadm, and kubectl from updating during system upgrades on my AWS Ubuntu server?

1

I recently installed kubelet, kubeadm, and kubectl on my AWS Ubuntu server using version 1.26.5-00 for each component. However, whenever I run system upgrade commands or similar operations, these Kubernetes components also get updated to newer versions automatically. This is causing disruptions to my critical applications that rely on specific versions of these components.

I would like to know how I can prevent kubelet, kubeadm, and kubectl from being updated during system upgrades while still ensuring the security and stability of my server. What are the recommended practices or configurations to maintain the existing versions of these components without impacting my applications? I appreciate any insights or suggestions on how to address this issue effectively. Thank you!

EXPERT
asked 2 years ago381 views
1 Answer
5
Accepted Answer

Hello,

please look at my solution it will be helpful for you.

To prevent kubelet, kubeadm, and kubectl from being automatically updated during system upgrades on your AWS Ubuntu server, you can utilize the apt-mark hold command. This command "holds" the specified packages at their current versions, preventing them from being upgraded by apt-get or similar package management commands.

$ sudo apt-mark hold kubelet kubeadm kubectl

After executing this command, kubelet, kubeadm, and kubectl will remain at their current versions and will not be updated automatically during system upgrades.

You can use this Kuberentes.io link if you get more information:

https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
  • thank you for your prompt response...it is really helpful.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.