This blog post covers the issue & fix which very few of us encountered while performing the kubeadm init command. We often see a kubeadm init get [ERROR CRI]: container runtime is not running. The complete error may look like the below along with an warning sometimes.
$ kubeadm init [WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR CRI]: container runtime is not running Status from runtime service failed” err=”rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”
[ERROR CRI]: container runtime is not running [Issue Encountered]
This is a common issue when you run the kubeadm init command while the CRI used is Containerd. In most cases, the issue is with the config.tomal file.
Fix the Error
To fix the error you can delete the config.tomal file and restart containerd then try the init command like below:
$ rm /etc/containerd/config.toml $ systemctl restart containerd $ kubeadm init
For the [WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly, you must configure the firewall on the master and workers.
To fulfill their tasks, nodes, containers, and pods must be able to communicate across the cluster. Add the following ports by entering the listed commands.
Enter the following commands on the Master Node:
$ sudo firewall-cmd --permanent --add-port=6443/tcp $ sudo firewall-cmd --permanent --add-port=2379-2380/tcp $ sudo firewall-cmd --permanent --add-port=10250/tcp $ sudo firewall-cmd --permanent --add-port=10251/tcp $ sudo firewall-cmd --permanent --add-port=10252/tcp $ sudo firewall-cmd --permanent --add-port=10255/tcp $ sudo firewall-cmd –reload
Each time a port is added the system confirms with a ‘success’ message.
Enter the following commands on each worker node:
$ sudo firewall-cmd --permanent --add-port=10251/tcp $ sudo firewall-cmd --permanent --add-port=10255/tcp $ firewall-cmd --reload
You can also check a discussion thread on GitHub form here
Related Post
- [Solved] The connection to the server localhost:8080 was refused – did you specify the right host or port?
- [Solved] Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)
- How To Setup A Three Node Kubernetes Cluster For CKA: Step By Step
- Certified Kubernetes Administrator (CKA): Step-by-Step Activity Guide (Hands-on Lab)
- CKA Certification Exam (Certified Kubernetes Administrator)
- Kubernetes for Beginners – A Complete Beginners Guide
- Kubernetes Dashboard: An Overview, Installation, and Accessing
- CKA/CKAD Exam Questions & Answers 2022
- Docker Container Lifecycle Management: Create, Run, Pause, Stop And Delete
- CKA vs CKAD vs CKS – Differences & Which Exam is Best For You?
- Etcd Backup And Restore In Kubernetes: Step By Step
Join FREE Class
Begin your journey towards becoming a Certified Kubernetes Administrator [CKA] from our Certified Kubernetes Administrator (CKA) training program. To know about the Roles and Responsibilities of a Kubernetes administrator, why learn Docker and Kubernetes, Job opportunities for Kubernetes administrator in the market. Also, know about Hands-On labs you must perform to clear the Certified Kubernetes Administrator (CKA) Certification exam by registering for our FREE class.
The post [ERROR CRI]: container runtime is not running [Solved] appeared first on Cloud Training Program.