# 内核版本 $ uname -r 5.4.119-20.0009.32 # docker 使用cgroup $ docker info |grep Cgroup Cgroup Driver: cgroupfs Cgroup Version: 1 $ kind create cluster --name local-k8s-cluster --config local-cluster.yaml Creating cluster "local-k8s-cluster" ... ✓ Ensuring node image (kindest/node:v1.33.1) 🖼 ✓ Preparing nodes 📦 📦 📦 ✓ Writing configuration 📜 ✗ Starting control-plane 🕹️ Deleted nodes: ["local-k8s-cluster-worker2" "local-k8s-cluster-control-plane" "local-k8s-cluster-worker"] ERROR: failed to create cluster: failed to init node with kubeadm: command "docker exec --privileged local-k8s-cluster-control-plane kubeadm init --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1 Command Output: I0722 08:05:29.122347 238 initconfiguration.go:261] loading configuration from "/kind/kubeadm.conf" W0722 08:05:29.122774 238 common.go:101] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta3" (kind: "ClusterConfiguration"). Please use 'kubeadm config migrate --old-config old-config-file --new-config new-config-file', which will write the new, similar spec using a newer API version. W0722 08:05:29.123194 238 common.go:101] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta3" (kind: "InitConfiguration"). Please use 'kubeadm config migrate --old-config old-config-file --new-config new-config-file', which will write the new, similar spec using a newer API version. W0722 08:05:29.123557 238 common.go:101] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta3" (kind: "JoinConfiguration"). Please use 'kubeadm config migrate --old-config old-config-file --new-config new-config-file', which will write the new, similar spec using a newer API version. W0722 08:05:29.123789 238 initconfiguration.go:362] [config] WARNING: Ignored configuration document with GroupVersionKind kubeadm.k8s.io/v1beta3, Kind=JoinConfiguration [init] Using Kubernetes version: v1.33.1 [certs] Using certificateDir folder "/etc/kubernetes/pki" I0722 08:05:29.124893 238 certs.go:112] creating a new certificate authority for ca [certs] Generating "ca" certificate and key I0722 08:05:29.266069 238 certs.go:473] validating certificate period for ca certificate [certs] Generating "apiserver" certificate and key [certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local local-k8s-cluster-control-plane localhost] and IPs [10.96.0.1 172.18.0.2 127.0.0.1] [certs] Generating "apiserver-kubelet-client" certificate and key I0722 08:05:29.807898 238 certs.go:112] creating a new certificate authority for front-proxy-ca [certs] Generating "front-proxy-ca" certificate and key I0722 08:05:29.941326 238 certs.go:473] validating certificate period for front-proxy-ca certificate [certs] Generating "front-proxy-client" certificate and key I0722 08:05:30.247917 238 certs.go:112] creating a new certificate authority for etcd-ca [certs] Generating "etcd/ca" certificate and key I0722 08:05:30.601358 238 certs.go:473] validating certificate period for etcd/ca certificate [certs] Generating "etcd/server" certificate and key [certs] etcd/server serving cert is signed for DNS names [local-k8s-cluster-control-plane localhost] and IPs [172.18.0.2 127.0.0.1 ::1] [certs] Generating "etcd/peer" certificate and key [certs] etcd/peer serving cert is signed for DNS names [local-k8s-cluster-control-plane localhost] and IPs [172.18.0.2 127.0.0.1 ::1] [certs] Generating "etcd/healthcheck-client" certificate and key [certs] Generating "apiserver-etcd-client" certificate and key I0722 08:05:31.637396 238 certs.go:78] creating new public/private key files for signing service account users [certs] Generating "sa" key and public key [kubeconfig] Using kubeconfig folder "/etc/kubernetes" I0722 08:05:31.787176 238 kubeconfig.go:111] creating kubeconfig file for admin.conf [kubeconfig] Writing "admin.conf" kubeconfig file I0722 08:05:32.125316 238 kubeconfig.go:111] creating kubeconfig file for super-admin.conf [kubeconfig] Writing "super-admin.conf" kubeconfig file I0722 08:05:32.195015 238 kubeconfig.go:111] creating kubeconfig file for kubelet.conf [kubeconfig] Writing "kubelet.conf" kubeconfig file I0722 08:05:32.404581 238 kubeconfig.go:111] creating kubeconfig file for controller-manager.conf [kubeconfig] Writing "controller-manager.conf" kubeconfig file I0722 08:05:32.956342 238 kubeconfig.go:111] creating kubeconfig file for scheduler.conf [kubeconfig] Writing "scheduler.conf" kubeconfig file [etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests" [control-plane] Using manifest folder "/etc/kubernetes/manifests" [control-plane] Creating static Pod manifest for "kube-apiserver" I0722 08:05:33.223304 238 local.go:66] [etcd] wrote Static Pod manifest for a local etcd member to "/etc/kubernetes/manifests/etcd.yaml" I0722 08:05:33.223340 238 manifests.go:104] [control-plane] getting StaticPodSpecs I0722 08:05:33.223504 238 certs.go:473] validating certificate period for CA certificate I0722 08:05:33.223568 238 manifests.go:130] [control-plane] adding volume "ca-certs" for component "kube-apiserver" I0722 08:05:33.223579 238 manifests.go:130] [control-plane] adding volume "etc-ca-certificates" for component "kube-apiserver" I0722 08:05:33.223582 238 manifests.go:130] [control-plane] adding volume "k8s-certs" for component "kube-apiserver" I0722 08:05:33.223586 238 manifests.go:130] [control-plane] adding volume "usr-local-share-ca-certificates" for component "kube-apiserver" I0722 08:05:33.223589 238 manifests.go:130] [control-plane] adding volume "usr-share-ca-certificates" for component "kube-apiserver" I0722 08:05:33.224386 238 manifests.go:159] [control-plane] wrote static Pod manifest for component "kube-apiserver" to "/etc/kubernetes/manifests/kube-apiserver.yaml" I0722 08:05:33.224401 238 manifests.go:104] [control-plane] getting StaticPodSpecs [control-plane] Creating static Pod manifest for "kube-controller-manager" I0722 08:05:33.224524 238 manifests.go:130] [control-plane] adding volume "ca-certs" for component "kube-controller-manager" I0722 08:05:33.224534 238 manifests.go:130] [control-plane] adding volume "etc-ca-certificates" for component "kube-controller-manager" I0722 08:05:33.224538 238 manifests.go:130] [control-plane] adding volume "flexvolume-dir" for component "kube-controller-manager" I0722 08:05:33.224541 238 manifests.go:130] [control-plane] adding volume "k8s-certs" for component "kube-controller-manager" I0722 08:05:33.224544 238 manifests.go:130] [control-plane] adding volume "kubeconfig" for component "kube-controller-manager" I0722 08:05:33.224547 238 manifests.go:130] [control-plane] adding volume "usr-local-share-ca-certificates" for component "kube-controller-manager" I0722 08:05:33.224550 238 manifests.go:130] [control-plane] adding volume "usr-share-ca-certificates" for component "kube-controller-manager" I0722 08:05:33.225089 238 manifests.go:159] [control-plane] wrote static Pod manifest for component "kube-controller-manager" to "/etc/kubernetes/manifests/kube-controller-manager.yaml" I0722 08:05:33.225103 238 manifests.go:104] [control-plane] getting StaticPodSpecs [control-plane] Creating static Pod manifest for "kube-scheduler" I0722 08:05:33.225224 238 manifests.go:130] [control-plane] adding volume "kubeconfig" for component "kube-scheduler" I0722 08:05:33.225661 238 manifests.go:159] [control-plane] wrote static Pod manifest for component "kube-scheduler" to "/etc/kubernetes/manifests/kube-scheduler.yaml" I0722 08:05:33.225683 238 kubelet.go:70] Stopping the kubelet [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env" [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml" [kubelet-start] Starting the kubelet I0722 08:05:33.302151 238 loader.go:402] Config loaded from file: /etc/kubernetes/admin.conf I0722 08:05:33.302483 238 envvar.go:172] "Feature gate default state" feature="InOrderInformers" enabled=true I0722 08:05:33.302498 238 envvar.go:172] "Feature gate default state" feature="WatchListClient" enabled=false I0722 08:05:33.302503 238 envvar.go:172] "Feature gate default state" feature="ClientsAllowCBOR" enabled=false I0722 08:05:33.302507 238 envvar.go:172] "Feature gate default state" feature="ClientsPreferCBOR" enabled=false I0722 08:05:33.302510 238 envvar.go:172] "Feature gate default state" feature="InformerResourceVersion" enabled=false [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests" [kubelet-check] Waiting for a healthy kubelet at http://127.0.0.1:10248/healthz. This can take up to 4m0s [kubelet-check] The kubelet is not healthy after 4m0.00070732s
Unfortunately, an error has occurred, 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'
The HTTP call equal to 'curl -sSL http://127.0.0.1:10248/healthz' returned error: Get "http://127.0.0.1:10248/healthz": context deadline exceeded
# 添加新集群 $ cat <<EOF | KIND_EXPERIMENTAL_DOCKER_NETWORK=kind kind create cluster --name=flannel-ipip --image=wangxiansen/kindest:v1.27.3 --config=- kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 networking: disableDefaultCNI: true podSubnet: "10.244.0.0/16" nodes: - role: control-plane - role: worker containerdConfigPatches: - |- [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] endpoint = ["https://docker.1ms.run"] EOF # 报错信息 I0801 14:56:58.198503 177 round_trippers.go:553] GET https://flannel-ipip-control-plane:6443/api/v1/nodes/flannel-ipip-worker?timeout=10s 404 Not Found in 1 milliseconds I0801 14:56:58.698722 177 round_trippers.go:553] GET https://flannel-ipip-control-plane:6443/api/v1/nodes/flannel-ipip-worker?timeout=10s 404 Not Found in 2 milliseconds I0801 14:56:59.198049 177 round_trippers.go:553] GET https://flannel-ipip-control-plane:6443/api/v1/nodes/flannel-ipip-worker?timeout=10s 404 Not Found in 2 milliseconds I0801 14:56:59.698995 177 round_trippers.go:553] GET https://flannel-ipip-control-plane:6443/api/v1/nodes/flannel-ipip-worker?timeout=10s 404 Not Found in 2 milliseconds I0801 14:57:00.198293 177 round_trippers.go:553] GET https://flannel-ipip-control-plane:6443/api/v1/nodes/flannel-ipip-worker?timeout=10s 404 Not Found in 1 milliseconds I0801 14:57:00.199855 177 round_trippers.go:553] GET https://flannel-ipip-control-plane:6443/api/v1/nodes/flannel-ipip-worker?timeout=10s 404 Not Found in 1 milliseconds nodes "flannel-ipip-worker" not found error uploading crisocket