{"id":119436,"date":"2024-07-31T23:12:43","date_gmt":"2024-07-31T20:12:43","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=119436"},"modified":"2024-07-31T23:12:56","modified_gmt":"2024-07-31T20:12:56","slug":"mirantis-container-runtime-kubernetes-docker-swarm","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/mirantis-container-runtime-kubernetes-docker-swarm\/","title":{"rendered":"Using Mirantis Container Runtime(MCR) in Kubernetes"},"content":{"rendered":"\n<p>Welcome to this guide on how to use Mirantis Container Runtime(MCR) in Kubernetes and Docker Swarm. The <strong>Mirantis Container Runtime(MCR) <\/strong>formerly known as the Docker Engine (Enterprise), is a secure container runtime that provides a base for the Mirantis Kubernetes Engine and Container Cloud. It provides increased security using the Mirantis Secure Registry, incorporated with Content Trust and FIPS 140-2 encryption.<\/p>\n\n\n\n<p>The Mirantis Container Runtime(MCR) installation has been made easy with the introduction of an automation script. Although there are still circumstances where you are required to perform a manual installation. For example, installing Mirantis Container Runtime(MCR) to prepare a server\/node to be added to an existing Mirantis Kubernetes Engine cluster that originally wasn&#8217;t managed by Mirantis Container Cloud.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"279\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2022\/07\/Mirantis-Container-Runtime-MCR.png\" alt=\"\" class=\"wp-image-121428\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2022\/07\/Mirantis-Container-Runtime-MCR.png 449w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2022\/07\/Mirantis-Container-Runtime-MCR-300x186.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2022\/07\/Mirantis-Container-Runtime-MCR-356x220.png 356w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\n\n\n\n<p>There are many features and capabilities provided by the Mirantis Container Runtime(MCR). Some of them are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Intrinsic Security<\/strong>: It is secure by default. Containers are deployed with restricted host access, end-to-end encryption, secure mutual TLS authentication, and cryptographic node identity.<\/li>\n\n\n\n<li><strong>Multiple Operating Systems and Infrastructures<\/strong>: It is certified to run on multiple operating systems that include RHEL, Ubuntu, CentOS, and Windows systems.<\/li>\n\n\n\n<li><strong>Certified Plugins<\/strong>: There are certified plugins that let you extend the functionality of Mirantis Container Runtime(MCR). They include; Calico, Kubernetes ingress solutions like Istio e.t.c<\/li>\n\n\n\n<li><strong>Enforce Signed Images<\/strong>: Proper digital signing of images is required to validate the container provenance before they are deployed. This prevents users from using images from unknown sources.<\/li>\n<\/ul>\n\n\n\n<p>By following this guide to the end, you will gain the required knowledge on how to use Mirantis Container Runtime in Kubernetes and Docker Swarm.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">System Requirements<\/h4>\n\n\n\n<p>This guide will work with the following:<\/p>\n\n\n\n<p><strong>Minimum Hardware Requirements for MKE nodes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>8GB of RAM for manager nodes<\/li>\n\n\n\n<li>4GB of RAM for worker nodes<\/li>\n\n\n\n<li>2 vCPUs for manager nodes<\/li>\n\n\n\n<li>25GB of free disk space<\/li>\n<\/ul>\n\n\n\n<p><strong>Production Hardware Requirements for MKE nodes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>16GB of RAM for manager nodes<\/li>\n\n\n\n<li>4 vCPUs for manager nodes<\/li>\n\n\n\n<li>25-100GB of free disk space. SSD is recommended.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1 &#8211; Prepare your Server<\/h2>\n\n\n\n<p>This guide demonstrates how to install the Mirantis Container Runtime(MCR) on several Linux distributions from the repository.<\/p>\n\n\n\n<p>Begin by removing previous docker installations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On CentOS\/Rhel<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum remove docker \\\n                docker-client \\\n                docker-client-latest \\\n                docker-common \\\n                docker-latest \\\n                docker-latest-logrotate \\\n                docker-logrotate \\\n                docker-selinux \\\n                runc \\\n                docker-engine-selinux \\\n                docker-engine<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On Ubuntu<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get remove docker docker-engine docker-ce docker-ce-cli docker.io<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On SLES<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zypper rm docker docker-engine runc\n##OR\nsudo rpm -e docker-engine<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 &#8211; Add Mirantis MCR Repository<\/h2>\n\n\n\n<p>Add the Mirantis Container Runtime(MCR) Repository to your system.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On Rhel\/CentOS<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Remove the available docker repo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rm \/etc\/yum.repos.d\/docker*.repo\nsudo yum install -y yum-utils\nexport DOCKERURL=\"<em>https:\/\/repos.mirantis.com<\/em>\"<\/code><\/pre>\n\n\n\n<p>Enable the <strong>extras Rhel <\/strong>repo to install container-selinux packages<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On Rocky Linux 8\n<\/mark><\/em>sudo -E sh -c 'echo \"$DOCKERURL\/rocky\" > \/etc\/yum\/vars\/dockerurl'\nsudo sh -c 'echo \"8\" > \/etc\/yum\/vars\/dockerosversion'\n\n<em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On RHEL 8\n<\/mark><\/em>sudo -E sh -c 'echo \"$DOCKERURL\/rhel\" > \/etc\/yum\/vars\/dockerurl'\nsudo sh -c 'echo \"8\" > \/etc\/yum\/vars\/dockerosversion'\n\n<em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On CentOS 8\n<\/mark><\/em>sudo -E sh -c 'echo \"$DOCKERURL\/centos\" > \/etc\/yum\/vars\/dockerurl'\nsudo sh -c 'echo \"8\" > \/etc\/yum\/vars\/dockerosversion'<\/code><\/pre>\n\n\n\n<p>Now add the MCR stable repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -E yum-config-manager \\\n    --add-repo \\\n    \"$DOCKERURL\/centos\/docker-ee.repo\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On Ubuntu<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Begin by installing the required packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install \\\n  apt-transport-https \\\n  ca-certificates \\\n  curl \\\n  software-properties-common<\/code><\/pre>\n\n\n\n<p>Export the variables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DOCKER_EE_URL=\"https:\/\/repos.mirantis.com\"<\/code><\/pre>\n\n\n\n<p>Add the GPG keys for the repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL \"${DOCKER_EE_URL}\/ubuntu\/gpg\" | sudo gpg --dearmor -o \/etc\/apt\/trusted.gpg.d\/mirantis.gpg<\/code><\/pre>\n\n\n\n<p>Finally, add the stable repository to the system.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><span style=\"text-decoration: underline;\">Ubuntu 24.04 \/ 22.04<\/span><\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo add-apt-repository \"deb &#91;arch=$(dpkg --print-architecture)] $DOCKER_EE_URL\/ubuntu jammy stable\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><span style=\"text-decoration: underline;\">Ubuntu 20.04<\/span><\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo add-apt-repository \"deb &#91;arch=$(dpkg --print-architecture)] $DOCKER_EE_URL\/ubuntu focal stable\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><span style=\"text-decoration: underline;\">Ubuntu 18.04<\/span><\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo add-apt-repository \"deb &#91;arch=$(dpkg --print-architecture)] $DOCKER_EE_URL\/ubuntu bionic stable\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On SLES<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Export the variables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DOCKER_EE_BASE_URL=\"https:\/\/repos.mirantis.com\"\nDOCKER_EE_URL=\"${DOCKER_EE_BASE_URL}\/sles\/&lt;SLES_VERSION&gt;\/&lt;ARCH&gt;\/stable-&lt;DOCKER_VERSION&gt;\"<\/code><\/pre>\n\n\n\n<p>Remember to replace the values for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SLES_VERSION<\/strong> &#8211; 15 or 12.3.<\/li>\n\n\n\n<li><strong>ARCH<\/strong> &#8211; x86_64.<\/li>\n\n\n\n<li><strong>DOCKER_VERSION<\/strong> &#8211; 20.10, there are also older releases such as 19.03, 18.09, 18.03 e.t.c<\/li>\n<\/ul>\n\n\n\n<p>Using the variables, set up the repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo zypper addrepo $DOCKER_EE_URL docker-ee-stable<\/code><\/pre>\n\n\n\n<p>Import the GPG keys:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rpm --import \"${DOCKER_EE_BASE_URL}\/sles\/gpg\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 &#8211; Install Mirantis Container Runtime(MCR)<\/h2>\n\n\n\n<p>Once the repository has been configured, proceed and install Mirantis Container Runtime(MCR) with the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On CentOS\/RHEL\n<\/mark><\/em>sudo yum -y install docker-ee docker-ee-cli containerd.io\n\n<em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On Ubuntu\n<\/mark><\/em>sudo apt update\nsudo apt install docker-ee docker-ee-cli containerd.io\n\n<em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On SLES\n<\/mark><\/em>sudo zypper refresh\nsudo zypper install docker-ee docker-ee-cli containerd.io<\/code><\/pre>\n\n\n\n<p>You can also install a specific version for production purposes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On CentOS\/RHEL\n<\/mark><\/em>sudo yum -y install docker-ee-<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;VERSION_STRING&gt;<\/em><\/mark> docker-ee-cli-<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;VERSION_STRING&gt;<\/em><\/mark> containerd.io\n\n<em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On Ubuntu\n<\/mark><\/em>sudo apt-get install docker-ee=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;VERSION_STRING&gt;<\/em><\/mark> docker-ee-cli=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;VERSION_STRING&gt;<\/em><\/mark> containerd.io\n\n<em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">##On SLES\n<\/mark><\/em>sudo zypper install docker-ee-<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;VERSION_STRING&gt;<\/em><\/mark> docker-ee-cli-<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;VERSION_STRING&gt;<\/em><\/mark> containerd.io<\/code><\/pre>\n\n\n\n<p>Replace the<strong> VERSION_STRING<\/strong> with the appropriate version to install.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4 &#8211; Test Mirantis Container Runtime(MCR)<\/h2>\n\n\n\n<p>Once installed, start the docker daemon.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable --now docker<\/code><\/pre>\n\n\n\n<p>Verify if it is running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status docker<\/code><\/pre>\n\n\n\n<p>Add your user to the Docker group.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -aG docker $USER\nnewgrp docker<\/code><\/pre>\n\n\n\n<p>Test by running a hello-world container.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run hello-world<\/code><\/pre>\n\n\n\n<p>Sample Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Unable to find image 'hello-world:latest' locally\nlatest: Pulling from library\/hello-world\n2db29710123e: Pull complete \nDigest: sha256:80f31da1ac7b312ba29d65080fddf797dd76acfb870e677f390d5acba9741b17\nStatus: Downloaded newer image for hello-world:latest\n\nHello from Docker!\nThis message shows that your installation appears to be working correctly.\n\nTo generate this message, Docker took the following steps:\n 1. The Docker client contacted the Docker daemon.\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\n    (amd64)\n 3. The Docker daemon created a new container from that image which runs the\n    executable that produces the output you are currently reading.\n 4. The Docker daemon streamed that output to the Docker client, which sent it\n    to your terminal.\n\nTo try something more ambitious, you can run an Ubuntu container with:\n $ docker run -it ubuntu bash\n\nShare images, automate workflows, and more with a free Docker ID:\n https:&#47;&#47;hub.docker.com\/\n\nFor more examples and ideas, visit:\n https:\/\/docs.docker.com\/get-started\/<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5 &#8211; Use MCR with Kubernetes<\/h2>\n\n\n\n<p>MCR can be used to provide a container runtime for Kubernetes pods. It is possible to use MCR with Kubernetes directly without MKE. Just enable the <code>cri-docker<\/code>plugin.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable --now cri-docker.service<\/code><\/pre>\n\n\n\n<p>Check the status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">systemctl status cri-docker.socket<\/mark>\n\u25cf cri-docker.socket - CRI Docker Socket for the API\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/cri-docker.socket; disabled; vendor preset: disabled)\n   Active: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">active (running)<\/mark> since Thu 2024-06-02 06:11:59 EDT; 10s ago\n   <strong><em>Listen: \/run\/cri-docker.sock (Stream)<\/em><\/strong>\n    Tasks: 0 (limit: 23505)\n   Memory: 4.0K\n   CGroup: \/system.slice\/cri-docker.socket<\/code><\/pre>\n\n\n\n<p>From the above output, we can identify the default socket:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Listen: <em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">\/run\/cri-docker.sock<\/mark><\/em><\/code><\/pre>\n\n\n\n<p>Proceed and use the Mirantis Container Runtime(MCR) as preferred. On a new Kubernetes cluster, you can use MCR as shown. I assume you already have Kubeadmin and all the required kubelets installed.<\/p>\n\n\n\n<p>You can use the below guide to achieve this.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/computingforgeeks.com\/deploy-kubernetes-cluster-on-almalinux-with-kubeadm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Deploy Kubernetes Cluster on AlmaLinux 8 with Kubeadm<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/deploy-kubernetes-cluster-on-ubuntu-with-kubeadm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Kubernetes Cluster on Ubuntu 20.04 with kubeadm<\/a><\/li>\n<\/ul>\n\n\n\n<p>Proceed and pull container images<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo kubeadm config images pull --cri-socket \/run\/cri-docker.sock <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Use MCR on a New Kubernetes cluster<\/h3>\n\n\n\n<p>Now bootstrap the control node. The below example can be used for a single node controller.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo kubeadm init \\\n  --pod-network-cidr=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-orange-color\">192.168.0.0\/16<\/mark> \\\n  --cri-socket \/run\/cri-docker.sock<\/code><\/pre>\n\n\n\n<p>Sample Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Your Kubernetes control-plane has initialized successfully!\n\nTo start using your cluster, you need to run the following as a regular user:\n\n  mkdir -p $HOME\/.kube\n  sudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\n  sudo chown $(id -u):$(id -g) $HOME\/.kube\/config\n\nAlternatively, if you are the root user, you can run:\n\n  export KUBECONFIG=\/etc\/kubernetes\/admin.conf\n\nYou should now deploy a pod network to the cluster.\nRun \"kubectl apply -f &#91;podnetwork].yaml\" with one of the options listed at:\n  https:&#47;&#47;kubernetes.io\/docs\/concepts\/cluster-administration\/addons\/\n\nThen you can join any number of worker nodes by running the following on each as root:\n\nkubeadm join 192.168.205.9:6443 --token 4oga4y.6uhgxfvf2cm0hc3g \\\n\t--discovery-token-ca-cert-hash sha256:7adf6b202bf0541bd0612b918477d979b6ed671bdcacf0d3910e521f66abc153 <\/code><\/pre>\n\n\n\n<p>If you had the control node initialized, reset it before executing the above command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo kubeadm reset<\/code><\/pre>\n\n\n\n<p>Once initialized, the certificate file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p $HOME\/.kube\nsudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\nsudo chown $(id -u):$(id -g) $HOME\/.kube\/config<\/code><\/pre>\n\n\n\n<p>Verify if the nodes are running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> kubectl get nodes<\/code><\/pre>\n\n\n\n<p>Also, verify if the runtime endpoint is configured:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> sudo cat \/var\/lib\/kubelet\/kubeadm-flags.env<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Migrate Existing Nodes to MCR<\/h3>\n\n\n\n<p>At times, you might find yourself in a situation where you need to migrate existing nodes from dockershim to MCR<\/p>\n\n\n\n<p>Cordon the node:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl cordon &lt;NODE_NAME&gt;<\/code><\/pre>\n\n\n\n<p>Proceed and drain the node:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl drain &lt;NODE_NAME&gt; --ignore-daemonsets<\/code><\/pre>\n\n\n\n<p>Open the file below on the node:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim \/var\/lib\/kubelet\/kubeadm-flags.env<\/code><\/pre>\n\n\n\n<p>Modify the line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--container-runtime-endpoint\n#TO\nunix:\/\/\/var\/run\/cri-docker.sock<\/code><\/pre>\n\n\n\n<p>Finally, edit the YAMLrepresentation for the node socket:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo KUBECONFIG=\/etc\/kubernetes\/admin.conf kubectl edit no &lt;NODE_NAME&gt;<\/code><\/pre>\n\n\n\n<p>In the file, change <strong><em>kubeadm.alpha.kubernetes.io\/cri-socket<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>##FROM\n<\/em><\/strong>\/var\/run\/dockershim.sock \n\n<strong><em>##TO\n<\/em><\/strong>unix:\/\/\/var\/run\/cri-docker.sock<\/code><\/pre>\n\n\n\n<p>Restart the kubelet and un cordon the node:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart kubelet\nkubectl uncordon <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-cyan-blue-color\"><em>&lt;NODE_NAME&gt;<\/em><\/mark><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6 &#8211; Install Mirantis CR License<\/h2>\n\n\n\n<p>Obtain a License from the <a href=\"https:\/\/store.mirantis.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Mirantis Container Runtime(MCR)<\/a> page. Follow the provided email link to download your license file.<\/p>\n\n\n\n<p>Copy the file data and paste it to the root directory in a file called <code>docker.lic<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudi vim \/var\/lib\/docker\/docker.lic<\/code><\/pre>\n\n\n\n<p>Once the file has been created, restart MCR.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart docker<\/code><\/pre>\n\n\n\n<p>Verify the installation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker info | grep -i license<\/code><\/pre>\n\n\n\n<p><strong><em>Books For Learning Kubernetes Administration:<\/em><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/computingforgeeks.com\/best-comptia-cysa-plus-certification-study-books\/\" target=\"_blank\" rel=\"noreferrer noopener\">Best Kubernetes Study books<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Closing Thoughts.<\/h2>\n\n\n\n<p>That was enough learning! We have walked through how to install and use the Mirantis Container Runtime(MCR) in Kubernetes and Docker Swarm. I hope this was significant.<\/p>\n\n\n\n<p>See more:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/computingforgeeks.com\/install-mirantis-cri-dockerd-as-docker-engine-shim-for-kubernetes\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Mirantis cri-dockerd as Docker Engine shim for Kubernetes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/deploy-kubernetes-cluster-on-almalinux-with-kubeadm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Deploy Kubernetes Cluster on AlmaLinux 8 with Kubeadm<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/deploy-kubernetes-cluster-on-ubuntu-with-kubeadm\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Kubernetes Cluster on Ubuntu 20.04 with kubeadm<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to this guide on how to use Mirantis Container Runtime(MCR) in Kubernetes and Docker Swarm. The Mirantis Container Runtime(MCR) formerly known as the Docker Engine (Enterprise), is a secure container runtime that provides a base for the Mirantis Kubernetes Engine and Container Cloud. It provides increased security using the Mirantis Secure Registry, incorporated with &#8230; <a title=\"Using Mirantis Container Runtime(MCR) in Kubernetes\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/mirantis-container-runtime-kubernetes-docker-swarm\/\" aria-label=\"Read more about Using Mirantis Container Runtime(MCR) in Kubernetes\">Read more<\/a><\/p>\n","protected":false},"author":21,"featured_media":121428,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[316,27,299,317],"tags":[37641],"cfg_series":[],"class_list":["post-119436","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containers","category-docker","category-how-to","category-kubernetes","tag-mirantis-container-runtimemcr"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/119436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=119436"}],"version-history":[{"count":2,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/119436\/revisions"}],"predecessor-version":[{"id":158428,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/119436\/revisions\/158428"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/121428"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=119436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=119436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=119436"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=119436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}