cri-o

Install Packages

Install cri-o packages (on Ubuntu 20.04 LTS):

install-cri-o.sh
#!/bin/bash
 
#author:  Thomas Roehm
#version: 1.0
 
export VERSION=1.25                                #must match k8s version
export OS="xUbuntu_20.04"                          #must match os version
 
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
apt update
apt install -y -t buster-backports libseccomp2 || apt update -y -t buster-backports libseccomp2
 
echo ""
 
echo "deb [signed-by=/usr/share/keyrings/libcontainers-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
echo "deb [signed-by=/usr/share/keyrings/libcontainers-crio-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
 
echo ""
echo "Install repositories"
echo ""
 
mkdir -p /usr/share/keyrings
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-archive-keyring.gpg
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-crio-archive-keyring.gpg
 
echo ""
echo "Install cri-o"
echo ""
 
apt-get update
apt-get install cri-o cri-o-runc cri-tools
 
systemctl enable crio.service
systemctl start crio.service
systemctl status crio.service

Commands

crictl info
crictl images
crioctl --help
crictl pull image
sudo crictl runp net-pod.json
sudo crictl create nginx.json net-pod.json
sudo crictl ps -a
echo "source <(crictl completion bash)" >> .bashrc                                                     #bash autocompletion
sudo curl -v --unix-socket /var/run/crio/crio.sock http://localhost/info | jq                          #check if running and show e. g. cgroup_driver

config

/etc/crio/crio.conf
/etc/crictl.yaml
/etc/containers/policy.json
docker/cri-o.txt · Last modified: 2022/10/03 16:21 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki