반응형

CRI-O

- Redhat에서 개발

- Kubernetes 통합 목적으로 CRI (Container Runtime Interface) 표준 컴포넌트를 최소한의 런타임으로 구현한 것

 

CRI-O 설치

CRI-O를 설치하기 위에서는 네트워크 설정이 필요

cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
br_netfilter
EOF

sudo modprobe overlay
sudo modprobe br_netfilter

cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf
net.bridge.bridge-nf-call-iptables  = 1
net.ipv4.ip_forward                 = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF

sudo sysctl --system

CRI-O 설치

sudo -i

export OS=xUbuntu_20.04 # OS 버전
export VERSION=1.19     # cri-o 버전

echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
echo "deb http://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

curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add -

sudo apt-get update

sudo apt-get -y install cri-o cri-o-runc cri-tools

sudo systemctl daemon-reload
sudo systemctl enable crio --now

 

CRI-O를 설치할 경우 crictl를 설치하여야 docker처럼 컨테이너를 제어할 수 있습니다

VERSION="v1.19.0"
wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz

 

그런데 docker에 익숙한 경우라면 crictl이 불편할 수 있습니다. (커맨드가 거의 유사하지만)

이럴땐 cri-docker를 설치함으로써 해결 할 수 있습니다. (기존에 docker가 설치되어 있어야 합니다)

wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.0/cri-dockerd_0.3.0.3-0.ubuntu-focal_amd64.deb

sudo dpkg -i cri-dockerd_0.3.0.3-0.ubuntu-focal_amd64.deb
반응형

+ Recent posts