Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about the error report of kubeadm installation

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

The purpose of this article is to share with you about how to report errors in kubeadm installation. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Kubeadm installation error phenomenon:

Because version 1.15 is too low, you want to install the latest version, but you need to upgrade one by one, so give up the direct reinstallation. First kubeadm reset, then follow the previous steps to install k8s:

The master node kubeadm initialization error is as follows:

[root@k01] # kubeadm init-apiserver-advertise-address=10.129.42.131-image-repository registry.cn-hangzhou.aliyuncs.com/lfy_k8s_images-kubernetes-version v1.21.0-service-cidr=10.96.0.0/16-pod-network-cidr=192.168.0.0/16. [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: lookup localhost on 8.8.8.8 sSL 53: no such host. [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: lookup localhost on 8.8.8.8 equal to 53: no such host. [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: lookup localhost on 8.8 .8.8: 53: no such host. [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: lookup localhost on 8.8.8.8 dial tcp 53: no such host. [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: lookup localhost on 8.8.8.8 http://localhost:10248/healthz' 53: no such host. 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' Additionally, a control plane component may have crashed or exited when started by the container runtime. To troubleshoot, list all containers using your preferred container runtimes CLI. Here is one example how you may list all Kubernetes containers running in docker:-'docker ps-a | grep kube | grep-v pause' Once you have found the failing container, you can inspect its logs with: -' docker logs CONTAINERID'error execution phase wait-control-plane: couldn't initialize a Kubernetes clusterTo see the stack trace of this error execute with-- vroom5 or higher troubleshooting process

1. Check according to the output result:

Kubelet is normal in active state.

According to the output, why would you go to lookup localhost on 8.8.8.8? Holding puzzled to ping for a while localhost, the result is 127.0.0.1 there seems to be no problem, so ignore this error.

According to the content of the error manual troubleshooting, the result is also ok.

[root@k01 ~] # curl-sSL http://localhost:10248/healthzok

2. View the messages log

The content of the log is similar to the output, but you can see that it is a network problem:

[root@k01 ~] # tail-f / var/log/messagesMay 17 13:01:07 DouyuTest01 kubelet: I0517 13 var/log/messagesMay 01DouyuTest01 kubelet 07.003029 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:07 DouyuTest01 kubelet: E0517 13 var/log/messagesMay 01var/log/messagesMay 07.799345 10865 kubelet.go:2218] "Container runtime network not ready" networkReady= "NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized" May 17 13:01:07 DouyuTest01 kubelet: I0517 131purse 07.983382 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:07 DouyuTest01 kubelet: I0517 131May 01DouyuTest01 kubelet 07.983386 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:07 DouyuTest01 kubelet: I0517 13May 01May 07.983455 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:08 DouyuTest01 kubelet: I0517 1301kubelet.go:461 08.003006 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01: 08 DouyuTest01 kubelet: I0517 13 Kubelet nodes not sync 01mer 08.983542 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:08 DouyuTest01 kubelet: I0517 13V 01V 08.983550 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:08 DouyuTest01 kubelet: I0517 13 Kubelet nodes not sync 01mer 01mer 08.983594 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:09 DouyuTest01 kubelet: I0517 13V 01mer 01mer 09.003077 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:09 DouyuTest01 kubelet: I0517 13 DouyuTest01 kubelet 01kubelet.go:461 09.983455 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:09 DouyuTest01 kubelet: I0517 13 DouyuTest01 kubelet 01mer 09.983469 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:09 DouyuTest01 kubelet: I0517 13DouyuTest01 kubelet 01lane 09.983513 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:10 DouyuTest01 kubelet: I0517 13:01: 10.003036 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:10 DouyuTest01 kubelet: E0517 13 May 01 May 10.025554 10865 event.go:273] Unable to write event:'& v1.Event {TypeMeta:v1.TypeMeta {Kind: " APIVersion: ""}, ObjectMeta:v1.ObjectMeta {Name: "k01.167fc1eedabaafaa", GenerateName: ", Namespace:" default ", SelfLink:", UID: ", ResourceVersion:", Generation:0, CreationTimestamp:v1.Time {Time:time.Time {wall:0x0, ext:0, loc: (* time.Location) (nil)}, DeletionTimestamp: (* v1.Time) (nil), DeletionGracePeriodSeconds: (* int64) (nil), Labels: mapstring] string (nil), Annotations: mapstring] string (nil) OwnerReferences: [] v1.OwnerReference (nil), Finalizers: [] string (nil), ClusterName: ", ManagedFields: [] v1.ManagedFieldsEntry (nil)}, InvolvedObject:v1.ObjectReference {Kind:" Node ", Namespace:", Name: "K01", UID: "K01", APIVersion: ", ResourceVersion:", FieldPath: "}, Reason:" Starting ", Message:" Starting kubelet. ", Source:v1.EventSource {Component:" kubelet ", Host:" K01 "}, FirstTimestamp:v1.Time {Time:time.Time {wall:0xc0209bf99d5e33aa Ext:6597724002, loc: (* time.Location) (0x74ad9e0)}}, LastTimestamp:v1.Time {Time:time.Time {wall:0xc0209bf99d5e33aa, ext:6597724002, loc: (* time.Location) (0x74ad9e0)}}, Count:1, Type: "Normal", EventTime:v1.MicroTime {Time:time.Time {wall:0x0, ext:0, loc: (* time.Location) (nil)}, Series: (* v1.EventSeries) (nil), Action: ", Related: (* v1.ObjectReference) (nil), ReportingController:" ReportingInstance: ""}': 'Post "https://10.129.42.131:6443/api/v1/namespaces/default/events": dial tcp 10.129.42.131 will retry in 6443: connect: connection refused' (may retry after sleeping) May 17 13:01:10 DouyuTest01 kubelet: E0517 1315 01 Swiss 10.107623 10865 controller.go:144] failed to ensure lease exists, will retry in 7s Error: Get "https://10.129.42.131:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/k01?timeout=10s": dial tcp 10.129.42.131 https://10.129.42.131:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/k01?timeout=10s": 6443: connect: connection refusedMay 17 13:01:10 DouyuTest01 kubelet: I0517 13 Get 01 Get 10.715642 10865 kubelet_node_status.go:71]" Attempting to register node "node=" K01 "May 17 13:01:10 DouyuTest01 kubelet: E0517 13 Get 01mer 10.716053 10865 kubelet _ node_status.go:93] "Unable to register node with API server" err= "Post\" https://10.129.42.131:6443/api/v1/nodes\": dial tcp 10.129.42.131 May 6443: connect: connection refused "node=" K01 "May 17 13:01:10 DouyuTest01 kubelet: I0517 13V 01V 10.983585 10865 kubelet.go:461]" Kubelet nodes not sync "May 17 13:01:10 DouyuTest01 kubelet: I0517 13V 01V 10.983675 10865 Kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:10 DouyuTest01 kubelet: I0517 13 May 01 kubelet.go:461 10.984259 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:11 DouyuTest01 kubelet: I0517 13 May 01 May 11.003219 10865 kubelet.go:461] "Kubelet nodes not sync" May 17 13:01:11 DouyuTest01 kubelet: I0517 13 May 01 DouyuTest01 kubelet 11.133807 10865 cni.go:239] "Unable to update cni config" err= "no networks found in / etc/cni/net.

3. Baidu

Baidu didn't get any results either. It modified the hosts mapping relationship of localhost.

[root@k01 ~] # cat / etc/hosts10.129.42.131 K01 localhost10.129.42.151 k0210.129.42.152 k0310.129.42.155 hub.atguigu.com

After the problem is solved, continue to initialize as follows:

…… [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 10.129.42.131 This can take up to 4m0s 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 10.129.42.131 connection refused 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 10.129.42.131 http://localhost:10248/healthz' 10248: connect: connection Refused. [apiclient] All control plane components are healthy after 65.003162 seconds Solution

Added a hosts record of 10.129.42.131 localhost

[kubelet-check] The HTTP call equal to 'curl-sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp: lookup localhost on 8.8.8.8 no such host. [kubelet-check] It seems like the kubelet isn't running or healthy. Thank you for reading! This is the end of this article on "how to report errors in kubeadm installation". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 218

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report