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 if Kubernetes reports an error?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

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.

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: 0

*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