Openshift 创建 Pod 状态状态一直处在 Pending 状态
创新互联公司是专业的三江侗网站建设公司,三江侗接单;提供成都网站制作、成都网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行三江侗网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!
# oc get pods NAME READY STATUS RESTARTS AGE hello-openshift-1-deploy 0/1 Pending 0 49s
# oc describe pod hello-openshift-1-deploy …… SecretName: deployer-token-tcb2q Optional: false QoS Class: BestEffort Node-Selectors: node-role.kubernetes.io/compute=true Tolerations:Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 3s (x8 over 1m) default-scheduler 0/3 nodes are available: 3 node(s) didn't match node selector.
查看 Node 节点标签
# oc describe node node1.example.com Name: node1.example.com Roles: infra Labels: beta.kubernetes.io/arch=amd64 beta.kubernetes.io/os=linux kubernetes.io/hostname=node1.example.com node-role.kubernetes.io/infra=true ……
查询发现没有需要的标签
给 Node 节点打所需的标签
# oc label node node1.example.com node-role.kubernetes.io/compute=true # oc label node node2.example.com node-role.kubernetes.io/compute=true
再次查看 Pod 状态
# oc get pods NAME READY STATUS RESTARTS AGE hello-openshift-1-deploy 0/1 ContainerCreating 0 18m
过会后再次查看
# oc get pods NAME READY STATUS RESTARTS AGE hello-openshift-1-5hqc2 1/1 Running 0 22m
问题完美解决!!!