Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to containerd for container runtime #207

Open
detiber opened this issue Aug 22, 2018 · 6 comments
Open

Switch to containerd for container runtime #207

detiber opened this issue Aug 22, 2018 · 6 comments

Comments

@detiber
Copy link
Contributor

detiber commented Aug 22, 2018

Update the quickstart to use containerd for the container runtime instead of docker.

@chuckha
Copy link
Member

chuckha commented Aug 22, 2018

My notes installing containerd on an ubuntu system:

## Runc

go get github.com/opencontainers/runc
cd go/src/github.com/opencontainers/runc/
make
make install


## Containerd
### Protoc
PROTOC_VERSION=3.5.0
apt install make build-essential unzip btrfs-tools pkg-config lxc-dev libseccomp-dev apparmor

cd /tmp
wget -c https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local

go get -d github.com/containerd/containerd
cd go/src/github.com/containerd/containerd
make
make install

cat <<EOF > /etc/systemd/system/containerd.service
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target

[Service]
ExecStartPre=/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerd
Delegate=yes
KillMode=process

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
service containerd start

@timothysc
Copy link
Member

/cc @rbankston as he's done it.

@rbankston
Copy link
Member

My notes on setting up an ubuntu system using the aws community image

Provision a containerd cluster by hand on Ubuntu 16.04


1. run `export VERSION="1.1.2"`
2. run `apt-get update`
3. run `apt-get install libseccomp2`
4. run `wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz`
5. run `sha256sum cri-containerd-${VERSION}.linux-amd64.tar.gz`
6. run `curl https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz.sha256`
7. Verify both sha hashes match
8. tar --no-overwrite-dir -C / -xzf cri-containerd-${VERSION}.linux-amd64.tar.gz
9. systemctl start containerd
10. run `apt-get update && apt-get install -y apt-transport-https curl`
11. run `curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
`
12. run `cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
`
13. run `apt-get update`
14. run `apt-get install -y kubelet kubeadm kubectl`
15. run `apt-mark hold kubelet kubeadm kubectl`
16. run `cat > /etc/systemd/system/kubelet.service.d/0-containerd.conf`
17. type `[Service]                                                 
Environment="KUBELET_EXTRA_ARGS=--container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=unix:///run/containerd/containerd.sock"`
18. run `systemctl daemon-reload`
19. run `systemctl restart kubelet`
20. run `modprobe br_netfilter`
21. run `echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables`
22. run `echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables`
23. run `echo '1' > /proc/sys/net/ipv4/ip_forward`
24. run `sysctl -p`
25. run kubeadm init or join command with the `--cri-socket=/var/run/containerd/containerd.sock` flag to point to containerd socket.

@vincepri
Copy link
Contributor

vincepri commented Sep 4, 2018

We're planning to add support for containerd during the v1.12 refresh.

@vincepri vincepri removed their assignment Oct 24, 2018
@timothysc
Copy link
Member

Given that wardroom is still being used, please update to the latest kubeadm supported version of docker.

@johnSchnake
Copy link
Contributor

Updated docker version in #243

Leaving this open for the time being in case we still want to consider moving to containerd

@johnSchnake johnSchnake removed their assignment Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants