There is a working k8s cluster with two nodes(master and worker) in it, and with CRI-O as a container runtime. I need(temporary) to switch from cri-o to docker container runtime.
I was trying to use these commands: kubectl cordon <node_name> kubectl drain <node_name> and it was failed on master node.
Here are some things to help you:
dockershimsupport was removed fromKubernetes v1.24+. So, if your Kubernetes version is one of these, docker as a runtimewill not work. This is a great resource in understanding the details of this.docker engineas a runtime, then as per the docs, you need to install thedocker engineand thencri-dockerdadapter to interface it with Kubernetes. Links for all this you can find in the linked docs.RuntimeClassobject in your cluster. You can use this guide.runtimeClassparameter to it, so it can be scheduled on the specified node.RuntimeClass./etc/kubernetes/manifestsdirectory. They are not applied through theKubernetes APIserver. Any runtime changes on the node will not affect these pods unless the cluster is deleted and these pods are created again. It is HIGHLY DISCOURAGED to manipulate these manifests because any errors will not be shown anywhere and the component will simply "not work". (Hence, static pods).Bottom line; Runtime changes only make sense for worker nodes. Do not try to change master node runtimes.