[root@172-16-59-32 ~]# ./install-k8s.sh 
[init] Using Kubernetes version: v1.23.5
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [k8s-node02 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 172.16.59.30]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [k8s-node02 localhost] and IPs [172.16.59.30 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [k8s-node02 localhost] and IPs [172.16.59.30 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[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
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.

[root@172-16-59-32 ~]# journalctl -xeu kubelet
Apr 02 03:03:46 k8s-node02 systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit kubelet.service has finished shutting down.
Apr 02 03:03:46 k8s-node02 systemd[1]: Started kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit kubelet.service has finished starting up.
-- 
-- The start-up result is done.
Apr 02 03:03:46 k8s-node02 kubelet[9414]: Flag --network-plugin has been deprecated, will be removed along with dockershim.
Apr 02 03:03:46 k8s-node02 kubelet[9414]: Flag --fail-swap-on has been deprecated, This parameter should be set via the config file specified by the Kubelet's --
Apr 02 03:03:46 k8s-node02 kubelet[9414]: Flag --network-plugin has been deprecated, will be removed along with dockershim.
Apr 02 03:03:46 k8s-node02 kubelet[9414]: Flag --fail-swap-on has been deprecated, This parameter should be set via the config file specified by the Kubelet's --
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.695902    9414 server.go:446] "Kubelet version" kubeletVersion="v1.23.5"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.696177    9414 server.go:874] "Client rotation is on, will bootstrap in background"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.697413    9414 certificate_store.go:130] Loading cert/key pair from "/var/lib/kubelet/pki/kubelet-client
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.698443    9414 dynamic_cafile_content.go:156] "Starting controller" name="client-ca-bundle::/etc/kuberne
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751251    9414 server.go:693] "--cgroups-per-qos enabled, but --cgroup-root was not specified.  defaulti
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751424    9414 container_manager_linux.go:281] "Container manager verified user specified cgroup-root ex
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751493    9414 container_manager_linux.go:286] "Creating Container Manager object based on Node Config" 
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751511    9414 topology_manager.go:133] "Creating topology manager with policy per scope" topologyPolicy
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751519    9414 container_manager_linux.go:321] "Creating device plugin manager" devicePluginEnabled=true
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751547    9414 state_mem.go:36] "Initialized new in-memory state store"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751618    9414 kubelet.go:313] "Using dockershim is deprecated, please consider using a full-fledged CRI
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751637    9414 client.go:80] "Connecting to docker on the dockerEndpoint" endpoint="unix:///var/run/dock
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.751646    9414 client.go:99] "Start docker client with request timeout" timeout="2m0s"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.762478    9414 docker_service.go:571] "Hairpin mode is set but kubenet is not enabled, falling back to H
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.762508    9414 docker_service.go:243] "Hairpin mode is set" hairpinMode=hairpin-veth
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.762594    9414 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.766674    9414 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.766728    9414 docker_service.go:258] "Docker cri networking managed by the network plugin" networkPlugi
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.766744    9414 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
Apr 02 03:03:46 k8s-node02 kubelet[9414]: I0402 03:03:46.777151    9414 docker_service.go:264] "Docker Info" dockerInfo=&{ID:BEFV:ZDOJ:Y2JS:FHMB:Q575:7OP4:PD62:W
Apr 02 03:03:46 k8s-node02 kubelet[9414]: E0402 03:03:46.777179    9414 server.go:302] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kube
Apr 02 03:03:46 k8s-node02 systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE
Apr 02 03:03:46 k8s-node02 systemd[1]: Unit kubelet.service entered failed state.
Apr 02 03:03:46 k8s-node02 systemd[1]: kubelet.service failed.
[root@172-16-59-32 ~]# 
posted on 2022-04-02 14:49  heidsoft  阅读(250)  评论(0编辑  收藏  举报