1

I want to set up my first kubernetes cluster for learning purposes.

I have 3 lxc containers running AlmaLiunx 8.4 *one should become the controller, the remaining 2 will become worker nodes.

As a guide I am use this tutorial. I want however use podman as container runtime and have installed that already on the to worker nodes. When executing the kubeadm init command on the controller I get an error saying docker would be a requirement.

# 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

I tried to cheat my out of this by adding alias docker-'podman' but that did not have the intended effect (I tested the alias. it works).

I am wondering whether you have to setup the cluster with docker first and replace it with podman on the worker nodes later on, or is there any secret podman-sauce you have to add during the setup procedure?

vrms
  • 227
  • 4
  • 16
  • podman is not a replacement for docker as a Kubernetes CRI. For that you want CRI-O. podman is intended for use in client machines to run containers there, not for container cluster nodes. – Rory McCune Sep 02 '21 at 07:56
  • Did @Mikolaj Glodziak answer help you to solve your problem?If yes,Please consider accepting and up voting it. [What should I do when someone answers my question](https://stackoverflow.com/help/someone-answers)? – Fariya Rahmat Apr 01 '22 at 05:52

1 Answers1

1

It looks like, that the main problem is here:

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

This means that either you do not have the docker installed at all or its executable is not in the PATH. You need to check if docker is installed (and install it if needed). Then make sure, that the docker executable file is located in your PATH.

See also this similar question.

  • docker is not installed as you guessed right. And that was the core of my question ... **do you need docker on the controller node if I not even want to use docker as container runtime** on the worker nodes? – vrms Aug 26 '21 at 16:42
  • Yes, in this situation you need docker. – Mikołaj Głodziak Aug 26 '21 at 19:12