Closed SnappyLarry closed 2 weeks ago
Does cluster creation work if you are not using a custom image? If so, can you describe the process you used to create this custom image? That would point to a problem with how that image is configured, but it's hard to say without knowing a little more about it.
Yes it does work with the original image.
To create the custom image, I do the following:
docker commit
of the running running kindest/node container with the following command :
docker commit de375 kindest/node:v1.29.2-pinpin
Now I try to create my cluster with this config:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.29.2-pinpin
and this command:
kind create cluster --name tester1 --config=integrated-tests/kind-config.yaml -v 5
It fails (with the output I provided earlier).
Hope this helps you understand more my situation
I think the easiest will probably be to run kind create cluster --name tester1 --config=integrated-tests/kind-config.yaml --retain
to keep the node container around after the failure. Then you can exec into the container to inspect the log files. Or kind export logs --name tester1
to extract everything locally.
I exported the logs with kind export
. The only thing that seems odd is the following error that loops in journal.log:
Jun 11 12:44:00 tester1-control-plane kubelet[260]: Flag --container-runtime-endpoint has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Jun 11 12:44:00 tester1-control-plane kubelet[260]: Flag --pod-infra-container-image has been deprecated, will be removed in a future release. Image garbage collector will get sandbox image information from CRI.
Jun 11 12:44:00 tester1-control-plane kubelet[260]: I0611 12:44:00.512696 260 server.go:204] "--pod-infra-container-image will not be pruned by the image garbage collector in kubelet and should also be set in the remote runtime"
Jun 11 12:44:00 tester1-control-plane kubelet[260]: I0611 12:44:00.624631 260 server.go:487] "Kubelet version" kubeletVersion="v1.29.2"
Jun 11 12:44:00 tester1-control-plane kubelet[260]: I0611 12:44:00.624674 260 server.go:489] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
Jun 11 12:44:00 tester1-control-plane kubelet[260]: I0611 12:44:00.624836 260 server.go:919] "Client rotation is on, will bootstrap in background"
Jun 11 12:44:00 tester1-control-plane kubelet[260]: E0611 12:44:00.625374 260 bootstrap.go:241] unable to read existing bootstrap client config from /etc/kubernetes/kubelet.conf: invalid configuration: [unable to read client-cert /var/lib/kubelet/pki/kubelet-client-current.pem for system:node:crossplane-perlinator-control-plane due to open /var/lib/kubelet/pki/kubelet-client-current.pem: no such file or directory, unable to read client-key /var/lib/kubelet/pki/kubelet-client-current.pem for system:node:crossplane-perlinator-control-plane due to open /var/lib/kubelet/pki/kubelet-client-current.pem: no such file or directory]
Jun 11 12:44:00 tester1-control-plane kubelet[260]: E0611 12:44:00.625418 260 run.go:74] "command failed" err="failed to run Kubelet: unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory"
Jun 11 12:44:00 tester1-control-plane systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Jun 11 12:44:00 tester1-control-plane systemd[1]: kubelet.service: Failed with result 'exit-code'.
Jun 11 12:44:00 tester1-control-plane kubelet[260]: E0611 12:44:00.625418 260 run.go:74] "command failed" err="failed to run Kubelet: unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory"
an important file is missing for the kubelet
Yes. but i dont understand how it somehow got omitted when i did the docker commit
?
install crossplane using a helm chart install crossplane required providers and functions (yaml manifests)
This would imply that you've fully created a cluster and are now trying to reuse it, right? That's similar to just stopping and restarting the cluster. But you're trying to deploy it again using kind
, so it's attempting to use your image as a base node image to create a new cluster. This will likely cause conflicts.
I think what you're hoping to do falls under #3508.
yep. seems like it.
trying to accelerate Kind cluster creation by using a commited image
isn't supported, see https://github.com/kubernetes-sigs/kind/issues/3508 for some discussion.
I recommend alternative performance improvements, e.g. you could kind load
the container images to avoid pulling, or better yet use a local registry and move things there (see the docs).
Hi, i am currently unable to start a kind cluster using a commited image as the control-plane image. I just installed crossplane and a couple of providers. Am I missing something?
Here are the details:
command:
kind-config.yaml:
Logs: