Updated and add containerd install
This commit is contained in:
parent
f66e8a535a
commit
d05b82b7f0
51
README.md
51
README.md
@ -88,8 +88,51 @@ sudo systemctl enable --now kubelet
|
||||
```shell
|
||||
kubeadm version
|
||||
```
|
||||
### 5. Configure containerd
|
||||
```shell
|
||||
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
|
||||
overlay
|
||||
br_netfilter
|
||||
EOF
|
||||
|
||||
#### Disable swap and install docker.io
|
||||
sudo modprobe overlay
|
||||
sudo modprobe br_netfilter
|
||||
|
||||
# Setup required sysctl params, these persist across reboots.
|
||||
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
|
||||
|
||||
# Apply sysctl params without reboot
|
||||
sudo sysctl --system
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /etc/containerd
|
||||
containerd config default | sudo tee /etc/containerd/config.toml
|
||||
|
||||
sudo systemctl restart containerd
|
||||
```
|
||||
|
||||
- Update config
|
||||
```shell
|
||||
sudo nano /etc/containerd/config.toml
|
||||
```
|
||||
- Change SystemdCgroup from **false** to **true**
|
||||
```toml
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
|
||||
SystemdCgroup = true
|
||||
```
|
||||
- Restart containerd service
|
||||
```shell
|
||||
sudo systemctl restart containerd
|
||||
```
|
||||
|
||||
|
||||
### 6. Disable swap and install docker.io
|
||||
```shell
|
||||
sudo swapoff -a
|
||||
wget https://sh.osa.cubetiqs.com/docker-setup.sh
|
||||
@ -116,7 +159,7 @@ EOF
|
||||
sudo apt-get -y install socat conntrack
|
||||
```
|
||||
|
||||
### 5. Cluster on Master node
|
||||
### 7. Cluster on Master node
|
||||
```shell
|
||||
sudo kubeadm init
|
||||
|
||||
@ -128,3 +171,7 @@ sudo chown $(id -u):$(id -g) $HOME/.kube/config
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
|
||||
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml
|
||||
```
|
||||
|
||||
#### References
|
||||
- https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker
|
||||
|
Loading…
Reference in New Issue
Block a user