Quantcast
Channel: Cloud Training Program
Viewing all articles
Browse latest Browse all 1891

[ERROR CRI]: container runtime is not running [Solved]

$
0
0

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.

[Solved][ERROR CRI]: container runtime is not running - Firewall

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

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 KubernetesJob 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.

Docker & Kubernetes Free class

The post [ERROR CRI]: container runtime is not running [Solved] appeared first on Cloud Training Program.


Viewing all articles
Browse latest Browse all 1891

Trending Articles