So today performed an upgrade of my self hosted kubernetes cluster from version 1.26.9 to 1.27.6 and run in to an issue where the kubelet failed to start on the worker nodes wit the following error in the journal log:

“command failed” err=”failed to parse kubelet flag: unknown flag: –container-runtime”

This is due to a depricated flag as part of the startup that has now been removed in 1.27.*, the fix for this is simple.

Edit the file: /var/lib/kubelet/kubeadm-flags.env

And remove using your editor of choice (mine is nano vi is the devil lol) “–container-runtime=remote”

Once the above is done do a: systemctl daemon-reload

If you’ve already done the upgrade do: systemctl restart kubelet.service

If not now do the package upgrades.