{"id":52081,"date":"2020-04-22T20:14:09","date_gmt":"2020-04-22T17:14:09","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=52081"},"modified":"2023-10-12T02:13:53","modified_gmt":"2023-10-11T23:13:53","slug":"install-cri-o-container-runtime-on-centos-linux","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/install-cri-o-container-runtime-on-centos-linux\/","title":{"rendered":"Install CRI-O Container Runtime on CentOS 8 \/ CentOS 7"},"content":{"rendered":"\n<p>CRI-O is an OCI-based implementation of Kubernetes <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/kubernetes\/community\/blob\/master\/contributors\/devel\/sig-node\/container-runtime-interface.md\" target=\"_blank\">Container Runtime Interface (CRI)<\/a>. CRI-O is meant to provide an integration path between OCI conformant runtimes and the kubelet. In this guide, we will discuss on the installation of CRI-O Container Runtime on CentOS 8 \/ CentOS 7 Linux system. The scope of CRI-O is restricted to the following functionalities:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Support multiple image formats including the existing Docker image format<\/li>\n\n\n\n<li>Support for multiple means to download images including trust &amp; image verification<\/li>\n\n\n\n<li>Container image management (managing image layers, overlay filesystems, etc)<\/li>\n\n\n\n<li>Container process lifecycle management<\/li>\n\n\n\n<li>Monitoring and logging required to satisfy the CRI<\/li>\n\n\n\n<li>Resource isolation as required by the CRI<\/li>\n<\/ul>\n\n\n\n<p>CRI-O use best of breed libraries for different aspects:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Runtime: <a href=\"https:\/\/github.com\/opencontainers\/runc\" target=\"_blank\" rel=\"noreferrer noopener\">runc<\/a> (or any OCI runtime-spec implementation) and <a href=\"https:\/\/github.com\/opencontainers\/runtime-tools\" target=\"_blank\" rel=\"noreferrer noopener\">oci runtime tools<\/a><\/li>\n\n\n\n<li>Images: Image management using <a href=\"https:\/\/github.com\/containers\/image\" target=\"_blank\" rel=\"noreferrer noopener\">containers\/image<\/a><\/li>\n\n\n\n<li>Storage: Storage and management of image layers using <a href=\"https:\/\/github.com\/containers\/storage\" target=\"_blank\" rel=\"noreferrer noopener\">containers\/storage<\/a><\/li>\n\n\n\n<li>Networking: Networking support through use of <a href=\"https:\/\/github.com\/containernetworking\/cni\" target=\"_blank\" rel=\"noreferrer noopener\">CNI<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Install CRI-O Container Runtime on CentOS 8 \/ CentOS 7<\/h2>\n\n\n\n<p>CRI-O and Kubernetes follow the same release cycle and deprecation policy. For more information visit the <a href=\"https:\/\/github.com\/kubernetes\/community\/blob\/master\/contributors\/design-proposals\/release\/versioning.md\" target=\"_blank\" rel=\"noreferrer noopener\">Kubernetes versioning documentation<\/a>. Update your system prior to installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum -y update\nsudo yum -y install epel-release<\/code><\/pre>\n\n\n\n<p>Below are the steps you&#8217;ll follow to install CRI-O on CentOS 8 \/ CentOS 7 Linux server  or Workstation machine.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Add CRI-O Repository<\/h3>\n\n\n\n<p>So if you&#8217;re running Kubernetes version <strong>1.28, <\/strong>you&#8217;ll install cri-o 1.28.x. We&#8217;ll save this version to a variable. Then add repository to our system.<\/p>\n\n\n\n<p><strong>Add repository to RHEL 8 based systems:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VERSION=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">1.28<\/mark>\nOS=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">CentOS_8<\/mark>\ncurl -L -o \/etc\/yum.repos.d\/devel:kubic:libcontainers:stable.repo https:\/\/download.opensuse.org\/repositories\/devel:\/kubic:\/libcontainers:\/stable\/$OS\/devel:\/kubic:\/libcontainers:\/stable.repo\ncurl -L -o \/etc\/yum.repos.d\/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https:\/\/download.opensuse.org\/repositories\/devel:\/kubic:\/libcontainers:\/stable:\/cri-o:\/$VERSION\/$OS\/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo<\/code><\/pre>\n\n\n\n<p><strong><strong>Add repository to RHEL <\/strong>7 based systems<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VERSION=<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">1.28<\/mark>\nsudo curl -L -o \/etc\/yum.repos.d\/devel:kubic:libcontainers:stable.repo https:\/\/download.opensuse.org\/repositories\/devel:kubic:libcontainers:stable\/CentOS_7\/devel:kubic:libcontainers:stable.repo\nsudo curl -L -o \/etc\/yum.repos.d\/devel:kubic:libcontainers:stable:cri-o:${VERSION}.repo https:\/\/download.opensuse.org\/repositories\/devel:kubic:libcontainers:stable:cri-o:${VERSION}\/CentOS_7\/devel:kubic:libcontainers:stable:cri-o:${VERSION}.repo<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install CRI-O Container Runtime<\/h3>\n\n\n\n<p>Once the repository is added, install CRI-O Container Runtime on CentOS 8 \/ CentOS 7 with this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install cri-o cri-tools<\/code><\/pre>\n\n\n\n<p>Agree to install a number of dependencies shown:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Transaction Summary\n========================================================================================================================================================\nInstall  19 Packages\nUpgrade   8 Packages\n\nTotal download size: 91 M\nIs this ok &#91;y\/N]: <span class=\"has-inline-color has-pale-pink-color\">y<\/span><\/code><\/pre>\n\n\n\n<p>GPG key should be imported as well.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>......   \nImporting GPG key 0x75060AA4:\n Userid     : \"devel:kubic OBS Project &lt;devel:kubic@build.opensuse.org&gt;\"\n Fingerprint: 2472 D6D0 D2F6 6AF8 7ABA 8DA3 4D64 3903 7506 0AA4\n From       : https:\/\/download.opensuse.org\/repositories\/devel:\/kubic:\/libcontainers:\/stable:\/cri-o:\/1.19\/CentOS_8\/repodata\/repomd.xml.key\nIs this ok &#91;y\/N]: <span class=\"has-inline-color has-pale-pink-color\">y<\/span><\/code><\/pre>\n\n\n\n<p>Confirm installation of CRI-O on CentOS:<\/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-luminous-vivid-amber-color\"> rpm -qi cri-o<\/mark>\nName        : cri-o\nEpoch       : 0\nVersion     : 1.28.1\nRelease     : 2.2.el7\nArchitecture: x86_64\nInstall Date: Wed 11 Oct 2023 11:06:34 PM UTC\nGroup       : Unspecified\nSize        : 265912940\nLicense     : ASL 2.0\nSignature   : RSA\/SHA256, Thu 21 Sep 2023 03:27:14 PM UTC, Key ID 4d64390375060aa4\nSource RPM  : cri-o-1.28.1-2.2.el7.src.rpm\nBuild Date  : Thu 21 Sep 2023 03:26:50 PM UTC\nBuild Host  : i02-ch2c\nRelocations : (not relocatable)\nVendor      : obs:\/\/build.opensuse.org\/devel:kubic\n...<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Start CRI-O Service<\/h3>\n\n\n\n<p>The cri-o service is not enabled or started by default. Let&#8217;s start it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable --now crio<\/code><\/pre>\n\n\n\n<p>Check service status if running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">systemctl status crio<\/span>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-light-green-cyan-color\">\u25cf<\/mark> crio.service - Container Runtime Interface for OCI (CRI-O)\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/crio.service; enabled; 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 Wed 2023-10-11 23:07:58 UTC; 5s ago\n     Docs: https:\/\/github.com\/cri-o\/cri-o\n Main PID: 1681 (crio)\n   CGroup: \/system.slice\/crio.service\n           \u2514\u25001681 \/usr\/bin\/crio\n\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.644729542Z\" level=info msg=\"Restore irqbalance config: created backup file\"\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.656763388Z\" level=warning msg=\"Error encountered when checking whether cri-o should wipe containers: open \/var\/ru...or directory\"\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.657506676Z\" level=info msg=\"Registered SIGHUP reload watcher\"\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.658944460Z\" level=info msg=\"Starting seccomp notifier watcher\"\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.659044052Z\" level=info msg=\"Create NRI interface\"\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.659066806Z\" level=info msg=\"NRI interface is disabled in the configuration.\"\nOct 11 23:07:58 cent7.mylab.io crio&#91;1681]: time=\"2023-10-11 23:07:58.659050193Z\" level=info msg=\"Serving metrics on :9537 via HTTP\"\nOct 11 23:07:58 cent7.mylab.io systemd&#91;1]: Started Container Runtime Interface for OCI (CRI-O).<\/code><\/pre>\n\n\n\n<p>Socket file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/var\/run\/crio\/crio.sock<\/code><\/pre>\n\n\n\n<p>In the guides to follow, we&#8217;ll cover creation of Kubernetes Cluster with CRI-O runtime engine  and maybe interacting with cri-o containers with <em><strong>crictl<\/strong><\/em> command line tool.<\/p>\n\n\n\n<p>In the meantime, check other container related articles available on our site.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/computingforgeeks.com\/how-to-open-a-shell-prompt-on-an-openshift-node\/\" target=\"_blank\">How To Open a Shell Prompt on an OpenShift Node<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/computingforgeeks.com\/how-to-install-kubernetes-dashboard-with-nodeport\/\" target=\"_blank\">How To Install Kubernetes Dashboard with NodePort<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/computingforgeeks.com\/create-admin-user-to-access-kubernetes-dashboard\/\" target=\"_blank\">How To Create Admin User to Access Kubernetes Dashboard<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/computingforgeeks.com\/minimal-container-operating-systems-for-kubernetes\/\" target=\"_blank\" rel=\"noreferrer noopener\">Top Minimal Container Operating Systems for running Kubernetes<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CRI-O is an OCI-based implementation of Kubernetes Container Runtime Interface (CRI). CRI-O is meant to provide an integration path between OCI conformant runtimes and the kubelet. In this guide, we will discuss on the installation of CRI-O Container Runtime on CentOS 8 \/ CentOS 7 Linux system. The scope of CRI-O is restricted to the &#8230; <a title=\"Install CRI-O Container Runtime on CentOS 8 \/ CentOS 7\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/install-cri-o-container-runtime-on-centos-linux\/\" aria-label=\"Read more about Install CRI-O Container Runtime on CentOS 8 \/ CentOS 7\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":52152,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[316,17,299,50],"tags":[21151,18616],"class_list":["post-52081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containers","category-centos","category-how-to","category-linux-tutorials","tag-coreos","tag-cri-o"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/52081","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=52081"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/52081\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/52152"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=52081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=52081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=52081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}