Kubespray: How to install k8s cluster with containerd but not docker?

Created on 2 Dec 2020  路  8Comments  路  Source: kubernetes-sigs/kubespray

How to config to install How to install k8s cluster with containerd but not docker with kubespray?

kinsupport

Most helpful comment

I think you mean CRI-O, as it is the CRI supported by K8S.

It is also supported by kubespray : https://github.com/kubernetes-sigs/kubespray/blob/master/docs/cri-o.md

All 8 comments

How to config to install How to install k8s cluster with containerd but not docker with kubespray?

Please look at the documentation.
This one might help you : https://github.com/kubernetes-sigs/kubespray/blob/master/docs/containerd.md

is podman supported?

I think you mean CRI-O, as it is the CRI supported by K8S.

It is also supported by kubespray : https://github.com/kubernetes-sigs/kubespray/blob/master/docs/cri-o.md

@floryut

I edit inventory/mycluster/group_vars/k8s-cluster/k8s-cluster.yml

## Container runtime
## docker for docker, crio for cri-o and containerd for containerd.
container_manager: containerd

But errors:

fatal: [node1]: FAILED! => {"attempts": 4, "changed": false, "cmd": ["sh", "-c", "/usr/bin/docker rm -f etcdctl-binarycopy; /usr/bin/docker create --name etcdctl-binarycopy quay.io/coreos/etcd:v3.4.3 && /usr/bin/docker cp etcdctl-binarycopy:/usr/local/bin/etcdctl /usr/local/bin/etcdctl && /usr/bin/docker rm -f etcdctl-binarycopy"], "delta": "0:00:00.024929", "end": "2020-12-04 12:41:19.436525", "msg": "non-zero return code", "rc": 127, "start": "2020-12-04 12:41:19.411596", "stderr": "sh: /usr/bin/docker: No such file or directory\nsh: /usr/bin/docker: No such file or directory", "stderr_lines": ["sh: /usr/bin/docker: No such file or directory", "sh: /usr/bin/docker: No such file or directory"], "stdout": "", "stdout_lines": []}

@hillbun as of right now the only way to do this is by using etcd in host mode and not as docker container. another option is to install docker by yourself on the etcd nodes.

@alb-dev @floryut

My problem is how to install k8s cluster with containerd with kubespray directly just edit config file?

Please advice, thanks.

@hillbun for container_manager you choose containred anf for etcd_depyloment_type you choose host. Etcd will be installed as a systemd unit in that case.

Was this page helpful?
0 / 5 - 0 ratings