请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

./kind create cluster --config kind-cluster-config.yml 报错了

root@ubuntu:/home# ./kind create cluster --config kind-cluster-config.yml
Creating cluster “kind” …
✓ Ensuring node image (kindest/node:v1.25.3) 🖼
✓ Preparing nodes 📦 📦 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
✗ Joining worker nodes 🚜
ERROR: failed to create cluster: failed to join node with kubeadm: command “docker exec --privileged kind-worker2 kubeadm join --config /kind/kubeadm.conf --skip-phases=preflight --v=6” failed with error: exit status 1
Command Output: I0602 07:53:26.758457 247 join.go:416] [preflight] found NodeName empty; using OS hostname as NodeName
I0602 07:53:26.760959 247 joinconfiguration.go:76] loading configuration from "/kind/kubeadm.conf"
I0602 07:53:26.772759 247 controlplaneprepare.go:220] [download-certs] Skipping certs download
I0602 07:53:26.772800 247 join.go:533] [preflight] Discovering cluster-info
I0602 07:53:26.772822 247 token.go:80] [discovery] Created cluster-info discovery client, requesting info from "kind-control-plane:6443"
I0602 07:53:27.062402 247 round_trippers.go:553] GET https://kind-control-plane:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s 200 OK in 269 milliseconds
I0602 07:53:27.105490 247 token.go:223] [discovery] The cluster-info ConfigMap does not yet contain a JWS signature for token ID “abcdef”, will try again
I0602 07:53:35.350867 247 round_trippers.go:553] GET https://kind-control-plane:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s 200 OK in 2251 milliseconds
I0602 07:53:36.708993 247 token.go:105] [discovery] Cluster info signature and contents are valid and no TLS pinning was specified, will use API Server "kind-control-plane:6443"
I0602 07:53:36.714035 247 discovery.go:52] [discovery] Using provided TLSBootstrapToken as authentication credentials for the join process
I0602 07:53:36.718810 247 join.go:547] [preflight] Fetching init configuration
I0602 07:53:36.720168 247 join.go:593] [preflight] Retrieving KubeConfig objects
[preflight] Reading configuration from the cluster…
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml’
I0602 07:53:41.483315 247 round_trippers.go:553] GET https://kind-control-plane:6443/api/v1/namespaces/kube-system/configmaps/kubeadm-config?timeout=10s 200 OK in 4648 milliseconds
I0602 07:53:43.338886 247 round_trippers.go:553] GET https://kind-control-plane:6443/api/v1/namespaces/kube-system/configmaps/kube-proxy?timeout=10s 200 OK in 1571 milliseconds
I0602 07:53:43.398370 247 kubelet.go:74] attempting to download the KubeletConfiguration from ConfigMap "kubelet-config"
I0602 07:53:43.445105 247 round_trippers.go:553] GET https://kind-control-plane:6443/api/v1/namespaces/kube-system/configmaps/kubelet-config?timeout=10s 200 OK in 44 milliseconds
I0602 07:53:43.509433 247 interface.go:432] Looking for default routes with IPv4 addresses
I0602 07:53:43.510004 247 interface.go:437] Default route transits interface "eth0"
I0602 07:53:43.512653 247 interface.go:209] Interface eth0 is up
I0602 07:53:43.512796 247 interface.go:257] Interface “eth0” has 3 addresses :[172.18.0.5/16 fc00:f853:ccd:e793::5/64 fe80::42:acff:fe12:5/64].
I0602 07:53:43.512835 247 interface.go:224] Checking addr 172.18.0.5/16.
I0602 07:53:43.512842 247 interface.go:231] IP found 172.18.0.5
I0602 07:53:43.512848 247 interface.go:263] Found valid IPv4 address 172.18.0.5 for interface “eth0”.
I0602 07:53:43.512851 247 interface.go:443] Found active IP 172.18.0.5
I0602 07:53:43.639345 247 kubelet.go:120] [kubelet-start] writing bootstrap kubelet config file at /etc/kubernetes/bootstrap-kubelet.conf
I0602 07:53:43.644832 247 kubelet.go:135] [kubelet-start] writing CA certificate at /etc/kubernetes/pki/ca.crt
I0602 07:53:43.648517 247 loader.go:374] Config loaded from file: /etc/kubernetes/bootstrap-kubelet.conf
I0602 07:53:43.664920 247 kubelet.go:156] [kubelet-start] Checking for an existing Node in the cluster with name “kind-worker2” and status "Ready"
I0602 07:53:43.702300 247 round_trippers.go:553] GET https://kind-control-plane:6443/api/v1/nodes/kind-worker2?timeout=10s 404 Not Found in 37 milliseconds
I0602 07:53:43.711164 247 kubelet.go:171] [kubelet-start] Stopping the kubelet
[kubelet-start] Writing kubelet configuration to file “/var/lib/kubelet/config.yaml”
[kubelet-start] Writing kubelet environment file with flags to file “/var/lib/kubelet/kubeadm-flags.env”
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap…
I0602 07:53:49.263534 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:53:54.377825 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:53:59.185631 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:04.234846 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:09.474427 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:14.499800 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:19.427904 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
[kubelet-check] Initial timeout of 40s passed.
I0602 07:54:24.163358 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:29.335636 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:34.188737 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:39.221665 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:44.267391 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:49.262955 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:54.395345 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:54:59.330814 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:04.214063 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:09.256530 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:14.427720 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:19.713141 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:25.053171 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:29.249296 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:34.337081 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:39.177766 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:44.235799 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:49.311176 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:54.213773 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:55:59.434448 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:04.505510 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:09.354295 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:14.252952 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:19.203626 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:24.827961 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:30.962479 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:34.388184 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:40.618876 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:44.273800 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:49.380295 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:54.223066 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:56:59.269269 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:04.238556 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:09.361641 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:14.245334 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:19.316520 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:24.213182 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:29.246525 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:34.189796 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:39.317752 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:44.220891 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:49.361733 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:54.228063 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:57:59.235342 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:04.250459 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:09.208894 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:14.193255 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:19.166684 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:24.165083 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:29.499260 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:34.170828 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:39.177495 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:44.165591 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf
I0602 07:58:44.168491 247 loader.go:374] Config loaded from file: /etc/kubernetes/kubelet.conf

Unfortunately, an error has occurred:
timed out waiting for the condition

This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- ‘systemctl status kubelet’
- 'journalctl -xeu kubelet’
timed out waiting for the condition
error execution phase kubelet-start
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1
cmd/kubeadm/app/cmd/phases/workflow/runner.go:235
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).visitAll
cmd/kubeadm/app/cmd/phases/workflow/runner.go:421
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run
cmd/kubeadm/app/cmd/phases/workflow/runner.go:207
k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdJoin.func1
cmd/kubeadm/app/cmd/join.go:181
github.com/spf13/cobra.(*Command).execute
vendor/github.com/spf13/cobra/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
vendor/github.com/spf13/cobra/command.go:974
github.com/spf13/cobra.(*Command).Execute
vendor/github.com/spf13/cobra/command.go:902
k8s.io/kubernetes/cmd/kubeadm/app.Run
cmd/kubeadm/app/kubeadm.go:50
main.main
cmd/kubeadm/kubeadm.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:250
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1594

正在回答 回答被采纳积分+3

1回答

暮闲 2024-09-26 08:16:31

同学的操作系统内核版本太低了 需要升级内核

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信