k8s集群管理注意要点【持续更新】
1.编写pod yaml文件时绑定调度标签,必须要给指定节点绑定标签,否则无法调度到指定节点上,报错:
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 62s (x2 over 62s) default-scheduler 0/2 nodes are available: 1 node(s) didn't have free ports for the requested pod ports, 1 node(s) didn't match node selector.
给节点绑定标签:
kubectl label nodes NODE_NAME ingress-name=ingress-true
kubectl label nodes NODE_NAME name=node02
kubectl get nodes --show-labels 更新标签:kubectl label nodes NODE_NAME name=node00 --overwrite
yaml文件指定调度标签:
spec: hostNetwork: true serviceAccountName: nginx-ingress-serviceaccount nodeSelector: ingress-name: ingress-true containers: - name: nginx-ingress-controller image: lizhenliang/nginx-ingress-controller:0.20.0
2.
一些事情一直在干,说不定以后就结果了呢
本文来自博客园,作者:chenjianwen,转载请注明原文链接:https://www.cnblogs.com/chenjw-note/p/11176056.html