-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Failed to create Control Plane/ Failed to install CNI #979
Comments
There are several users that are using kind in Gitlab, some working config is documented here You can also use github search to look for "gitlab" issues that are closed like this one |
can you export the logs? it looks to me like we can't talk to the apiServer healthily, but it's not possible to tell why. |
kubelet / containerd should normally complain some about CNI until the kindnetd daemonset runs. having issues applying that generally means the api server or the connection to it is not healthy, which can be caused by various problems with the host. |
Logs attached. |
@BenTheElder is it possible to run dind without mounting
|
@aojea it depends, nothing we do explicitly has a hard dependency on |
It turns out the /sys/fs/cgroup must be a HOST mounted volume in the container where the docker daemon runs. In CI environments there's no control over the podSpec of the launched pod and therefor This podSpec mimicks/reproduces the (gitlab CI with kubernetes executor) job behavior. It starts working when you use the volumeMount in the 'dind' container.
|
@jansmets seems you've found the problem, do you mind to retitle this issue so other users can find it easily? |
This works though :
More CI/CD systems run jobs on kubernetes clusers and these system don't allow modifications to the podSpec of the job. It's nearly impossible to mount host volumes like Thank you again for your insights. |
If you're running on Kubernetes there's an existing issue discussing these requirements, and indeed I would recommend not running kind in Kubernetes if you can avoid it. There are many pitfalls versus more traditional CI hosts. And yet, the Kubernetes project is Kubernetes CI based so #303 |
Sorry I didn't understand you were in Kubernetes previously. This is a duplicate of #303. As you can see we are in fact hesitant to encourage people to replicate this versus running on a VM platform like circle CI machine executor or GCB or ... |
Hi
I'd like to run KinD in a Gitlab CI pipeline. I have a (bare metal on prem) kubernetes cluster where gitlab launches containers with a docker-in-docker service. (there is no (easy) ability to mount additional host volumes, like
/lib/modules
).kind-control-plane has access to
/sys/fs/cgroup
. and runs in privileged mode. The 'overlay' kernel module has been loaded. It does not have a/lib/modules
mount.cluster create gives :
And sometimes slightly different where "Starting control-plane" reports success.
containerd's pre-init fails to modprobe the overlay module, but it's fine as that one is already loaded by the host kernel. Containerd continues to start and then gives an Error about the CNI plugin not being loaded.
but kubelet seems to be in a limbo state, continuously restarting because of the missing CNI.
The CNI is set up by the kindnetd DaemonSet (?) - (but it doesn't get a proper chance to do it. ?)
when I manually apply the default-cni.yaml (with templated Podsubnet set to 10.244.0.0/16) I'm not getting any further as kindnet DS isn't scheduled on NotReady nodes.
I wonder if this is just a side effect.
For example, the
kube-scheduler
is reporting:Any pointers are welcome.
Thank you
The text was updated successfully, but these errors were encountered: