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

K8S creates the Pod state state and is always in the Pending state

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

Share

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

Openshift creates Pod state state is always in Pending state

# oc get podsNAME READY STATUS RESTARTS AGEhello-openshift-1-deploy 0/1 Pending 0 49s

# oc describe pod hello-openshift-1-deploy... SecretName: deployer-token-tcb2q Optional: falseQoS Class: BestEffortNode-Selectors: node-role.kubernetes.io/compute=trueTolerations: Events: Type Reason Age From Message-Warning FailedScheduling 3s (x8 over 1m) default-scheduler 0 default-scheduler 3 nodes are available: 3 node (s) didn't match node selector.

View the Node node label

# oc describe node node1.example.comName: node1.example.comRoles: infraLabels: beta.kubernetes.io/arch=amd64 beta.kubernetes.io/os=linux kubernetes.io/hostname=node1.example.com node-role.kubernetes.io/infra=true.

The query found no required tags.

Tag the Node node as needed

# oc label node node1.example.com node-role.kubernetes.io/compute=true# oc label node node2.example.com node-role.kubernetes.io/compute=true

Check the Pod status again

# oc get podsNAME READY STATUS RESTARTS AGEhello-openshift-1-deploy 0/1 ContainerCreating 0 18m

Check again after the meeting

# oc get podsNAME READY STATUS RESTARTS AGEhello-openshift-1-5hqc2 1 5hqc2 1 Running 0 22m

The problem is solved perfectly!

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