I am trying to set up a container image for my CI which is supposed to serve all tools needed for the pipeline to run.
The idea is to use a podman image quay.io/podman/stable
and install KIND and other dependencies. This image is then used by the pipeline agent to deploy services into the KIND cluster to run tests.
The issue is: When running
kind create cluster
inside the successfully built container I get this error message:ERROR: failed to create cluster: running kind with rootless provider requires cgroup v2, > see https://kind.sigs.k8s.io/docs/user/rootless/
The provided link does not give me any hints to solve my problem in a container.
My dockerfile looks like this:
FROM quay.io/podman/stable:latest
RUN yum update -y && yum install -y golang openssl
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
RUN go install sigs.k8s.io/kind@v0.20.0 && \
cp /root/go/bin/kind /bin/kind
RUN install -o root -g root -m 0755 /root/go/bin/kind /usr/local/bin/kind
I don't really know where I should start looking for issues. Reading the podman documentation didn't help much.
Did anyone come across this issue and can help me out here?
Thanks in advance!
Daniel
P.S.: You might ask yourself why I do not use docker for this. The reason is, especially for gitlab pipelines the docker daemon is a hastle to work with. Thats why I wanted to work with podman, which works perfectly fine for "normal" scenarios like building an image or running a compose up.