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

Incorrect runtime. Please specify a container runtime other than Docker to install Kubernetes v1.24 or later. #2153

Open
LiShuang-codes opened this issue Mar 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@LiShuang-codes
Copy link

What is version of KubeKey has the issue?

3.0.13

What is your os environment?

ubuntu 22.04.3, linux 6.5

KubeKey config file

default(single node).

A clear and concise description of what happend.

Cannot create cluster. My docker runs normally but it tells me "Incorrect runtime. Please specify a container runtime other than Docker to install Kubernetes v1.24 or later.".

root@master:/software/docker# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2024-03-04 18:50:29 CST; 18min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 75085 (dockerd)
      Tasks: 8
     Memory: 22.2M
        CPU: 286ms
     CGroup: /system.slice/docker.service
             └─75085 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

3月 04 18:50:29 master systemd[1]: Starting Docker Application Container Engine...
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.052843626+08:00" level=info msg="Starting up"
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.053742647+08:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolv>
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.117844091+08:00" level=info msg="Loading containers: start."
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.382771344+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address>
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.423515594+08:00" level=info msg="Loading containers: done."
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.448624350+08:00" level=info msg="Docker daemon" commit=9dbdbd4 graphdriver=overlay2 vers>
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.449056377+08:00" level=info msg="Daemon has completed initialization"
3月 04 18:50:29 master systemd[1]: Started Docker Application Container Engine.
3月 04 18:50:29 master dockerd[75085]: time="2024-03-04T18:50:29.482117170+08:00" level=info msg="API listen on /run/docker.sock"

Relevant log output

root@master:/software/docker# kk create cluster --with-kubernetes v1.26.5 --container-manager docker --with-kubesphere v3.4.0


 _   __      _          _   __
| | / /     | |        | | / /
| |/ / _   _| |__   ___| |/ /  ___ _   _
|    \| | | | '_ \ / _ \    \ / _ \ | | |
| |\  \ |_| | |_) |  __/ |\  \  __/ |_| |
\_| \_/\__,_|_.__/ \___\_| \_/\___|\__, |
                                    __/ |
                                   |___/

19:07:05 CST [GreetingsModule] Greetings
19:07:05 CST message: [master]
Greetings, KubeKey!
19:07:05 CST success: [master]
19:07:05 CST [NodePreCheckModule] A pre-check on nodes
19:07:05 CST success: [master]
19:07:05 CST [ConfirmModule] Display confirmation form
+--------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
| name   | sudo | curl | openssl | ebtables | socat | ipset | ipvsadm | conntrack | chrony | docker | containerd | nfs client | ceph client | glusterfs client | time         |
+--------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
| master | y    | y    | y       | y        | y     | y     | y       | y         | y      | 23.0.6 | 1.6.28     |            | y           |                  | CST 19:07:05 |
+--------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+

This is a simple check of your environment.
Before installation, ensure that your machines meet all requirements specified at
https://github.com/kubesphere/kubekey#requirements-and-recommendations

[Notice]
Incorrect runtime. Please specify a container runtime other than Docker to install Kubernetes v1.24 or later.
You can set "spec.kubernetes.containerManager" in the configuration file to "containerd" or add "--container-manager containerd" to the "./kk create cluster" command.
For more information, see:
https://github.com/kubesphere/kubekey/blob/master/docs/commands/kk-create-cluster.md
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#container-runtimes
https://kubernetes.io/blog/2022/02/17/dockershim-faq/

Additional information

no

@LiShuang-codes LiShuang-codes added the bug Something isn't working label Mar 4, 2024
@pixiake
Copy link
Collaborator

pixiake commented Mar 4, 2024

https://github.com/kubesphere/kubekey/blob/master/docs/commands/kk-create-cluster.md
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#container-runtimes
https://kubernetes.io/blog/2022/02/17/dockershim-faq/

As you can see, since from k8s v1.24, Docker is no longer supported by default. You can either use --container-manager containerd or v3.1.0-rc.0, which will install cri-docker to integrate with Docker.
https://github.com/kubesphere/kubekey/releases/tag/v3.1.0-rc.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants