Score:1

setting up k8s cluster with podman

de flag

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?

cn flag
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.
Fariya Rahmat avatar
ve flag
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)?
Score:1
id flag

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.

vrms avatar
de flag
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?
Mikołaj Głodziak avatar
id flag
Yes, in this situation you need docker.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.