为了学习目的,我想建立我的第一个kubernetes集群。
我有3个lxc容器运行AlmaLiunx 8.4
*一个应该成为控制器,其余2个将成为工作节点。
作为指南,我正在使用本教程。但是,我希望使用podman作为容器运行时,并且已经安装在to worker节点上。当在控制器上执行kubeadm init
命令时,我会发现一个错误,即码头是必需的。
# kubeadm init
[init] Using Kubernetes version: v1.22.1
[preflight] Running pre-flight checks
[preflight] WARNING: Couldn't create the interface used for talking to the container runtime: docker is required for container runtime: exec: "docker": executable file not found in $PATH
[WARNING FileExisting-tc]: tc not found in system path
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
error execution phase preflight: docker is required for container runtime: exec: "docker": executable file not found in $PATH
To see the stack trace of this error execute with --v=5 or higher
我试图通过添加alias docker-'podman'
来欺骗自己,但这并没有达到预期的效果(我测试了别名。起作用)。
我想知道您是否必须先用docker安装集群,然后在工作节点上用podman替换它,还是在安装过程中必须添加任何秘密podman酱汁?
发布于 2021-08-26 13:56:45
看起来,主要的问题是:
WARNING: Couldn't create the interface used for talking to the container runtime: docker is required for container runtime: exec: "docker": executable file not found in $PATH
这意味着要么根本没有安装停靠程序,要么它的可执行文件不在路径中。您需要检查是否安装了docker (如果需要,请安装它)。然后确保停靠程序可执行文件位于您的路径中。
另见这个类似的问题。
https://serverfault.com/questions/1075688
复制相似问题