-
Notifications
You must be signed in to change notification settings - Fork 295
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
Can't initialize Kubernetes-Cluster with cri-dockerd #179
Comments
Please provide logs from kudeadm |
This is the full stacktrace of the initalization:
This is an excerpt of the kubectl's journal:
|
What user are you running this as? What are the permissions on the socket versus that user's group membership? |
The /var/run/cri-dockerd.sock is in group docker I installed cri-dockerd as root and ran every other command as user 1000
|
I0413 10:44:03.587274 4864 checks.go:833] failed to detect the sandbox image for local container runtime, output: time="2023-04-13T10:44:03Z" level=fatal msg="getting status of runtime: failed to template data: template: tmplExecuteRawJSON:1:9: executing "tmplExecuteRawJSON" at <.config.sandboxImage>: map has no entry for key "config"" |
This has absolutely nothing to do with this.
The user must be in the |
I run kubeadm as sudo, so I think the permissions should be fine, shouldn't they? 1 1/2 years ago I created another Kubernetes-Cluster, when docker was still part of it and used almost the same procedure. It was basically the same steps as I descriped on top of the thread, minus Enable kernel modules, Load modules, Setup required sysctl params, Reload sysctl and, obviously, Install cri-dockerd. I also used Ubuntu 20.04 back then, could this be a problem, using 22.04 now? I also tried setting up the current Kubernetes-Cluster with containerd, and this works actually fine. The only difference in the kubeadm output, compared to when I run it with cri-dockerd, is the error message cuisongliu cited, regarding the sandbox image. Everything else, besides the failing of kubeadm is identical between containerd and cri-dockerd, when I initialize the cluster with kubeadm. I wonder, has anyone of you created a new Kubernetes-Cluster from scratch since the new release of 1.27? |
Yes. Where does this argument come from: Before your cluster is operational, you also need to configure CNI. But that should fail at a later stage, like with coredns.
|
As far as I know, it will set the ip-range for the CNI. I want to use calico, so I set the range myself. For flannel, it is required to be set to "10.244.0.0/16". I tested to install cri-dockerd with Kubernetes 1.26.X and 1.25.X. Both of them run into the same error as 1.27.X, so I assume, it must be something else than the issue that cuisongliu mentioned (sandbox image config). Because 1.26 and 1.25 both didn't have that error popping up during kubeadm init, but still fail with the same results and logs from kubelet (see second post of me) |
Does that CIDR overlap with your normal network? |
No, there are no networks, that overlap. But I just found out, that if I use the pre-build binaries of cri-dockerd, the kubeadm init works without problems. That means, if you take my installation steps from the first post and replace the step Install cri-dockerd (as root) with the following steps, the kubeadm initializes the cluster:
The pre-build binaries have the version The binaries built from the README in this repository have the version So my problem must be caused by code between 7e528b9 and HEAD. |
I used |
I just reverted this PR, since it appears to have bad side effects in cases where a CNI's IPAM isn't up and running (cluster upgrades, new clusters) |
Hi,
I'm relatively new to Kubernetes and the general setup. I read some guides and the official documentations of Kubernetes / Mirantis / Docker on how to install all required components for a cluster-setup.
I tried to get the Kubernetes control-plane to be setup successfully, but it doesn't work with cri-dockerd. I also tried it with the latest containerd.io and it was successful. So I figured I might ask for help in this repository, since the setup workds with containerd, but not with cri-dockerd.
I wrote down all my (exact) installation steps below.
After
kubeadm init ...
I run into a timeout and get an error message (described in Actual behaviour).Can you help me fixing this problem?
I can provide further logs / diagnostics of my system, if you tell me where to look.
Thanks in advance!
Expected behaviour
The initalization runs without problems and I get to "Your Kubernetes control-plane has initialized successfully!"
Actual behaviour
I get the following error message:
General information about setup
Installation steps
sudo kubeadm init --pod-network-cidr 192.168.0.0/16 --cri-socket unix:///var/run/cri-dockerd.sock
The text was updated successfully, but these errors were encountered: