Modify Kubernetes cluster criSocket setting

10/8/2021

I have a Kubernetes lab environment for studying an online course. <br> I missed a step in the installation instructions and didn't change the criSocket setting. <br> How can I change this setting and keep the rest of the cluster configuration? <br> I don't want to regenerate default cluster config, as I did in when I installed Kuberentes:

kubeadm config print init-defaults | tee ClusterConfiguration.yaml

The cluster contains 1 control plane node and 3 worker nodes.

-- jwalker
configuration
kubernetes

1 Answer

11/30/2021

cri-socket is a setting for kubelet.

If you have already done some specific settings for the CRI that you want to use, I guess you can switch to the other CRI by editing /var/lib/kubelet/kubeadm-flags.env.

After stopping kubelet, add/modify --container-runtime-endpoint=... on that file and restart kubelet. Then kubelet will use a new CRI which is specified there.

This article may help you: https://dev.to/stack-labs/how-to-switch-container-runtime-in-a-kubernetes-cluster-1628

-- Daigo
Source: StackOverflow