Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if Kubernetes reports an error?

Shulou Source: shulou.com Published: 2022-05-31 16:25:42 09月21日 Update

This article will explain in detail how to report errors in Kubernetes. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The error message of kubernetes when creating pod is as follows:

Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message-2m 2m 1 {default-scheduler} Normal Scheduled Successfully assigned my-nginx-1948696469-ph21m to iz2ze39jeyizepdxhwqci6z 2m 0s 177 {kubelet iz2ze39jeyizepdxhwqci6z} Warning FailedSync Error syncing pod Skipping: failed to "SetupNetwork" for "my-nginx-1948696469-ph21m_default" with SetupNetworkError: "Failed to setup network for pod\" my-nginx-1948696469-ph21m_default (3700d74a-cc12-11e6-8c42-00163e1001d7)\ "using network plugins\" cni\ ": no IP addresses available in network: cbr0 Skipping pod "Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message-23s 23s 1 {default-scheduler} Normal Scheduled Successfully assigned my-nginx-1948696469-7p4nn to iz2ze39jeyizepdxhwqci6z 22s 1s 22 {kubelet iz2ze39jeyizepdxhwqci6z} Warning FailedSync Error syncing pod Skipping: failed to "SetupNetwork" for "my-nginx-1948696469-7p4nn_default" with SetupNetworkError: "Failed to setup network for pod\" my-nginx-1948696469-7p4nn_default (a40fe652-cc14-11e6-8c42-00163e1001d7)\ "using network plugins\" cni\ ":\" cni0\ "already has an IP address different from 10.244.1.1 Universe 24 Skipping pod "

The cause of these problems is the flannel network problem. The most direct way is to re-reset the node as follows:

Execute on node:

After kubeadm reset, the bridge device cni0 created by flannel and the network port device flannel.1 are still alive. To ensure that the environment is fully restored to its original state, we can delete the two devices with the following command: # ifconfig cni0 down# brctl delbr cni0# ip link delete flannel.1

After the above execution is completed, you can reconnect to the master, and you can create it directly.

This is the end of this article on "how to report an error in Kubernetes". 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, please share it for more people to see.

Tags: Article how to do method more equipment problem good practical two information content reason can be passed command that is article time state environment knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Information Xiaomi vpn OPPO Reno