kubectl查看node状态_K8S常用命令

1、master查看待审批node信息:

[k8s@database_1 dns]$ kubectl get csr

NAME AGE REQUESTOR CONDITION

node-csr-QOrUGcKDtAip5-k0MU3KFoY4hD0It3wXRh2uGURBa4U 26m kubelet-bootstrap Approved,Issued

node-csr-u6GJPmKrahi21mOeiQikVYO4ZmE4Aq-NnlK_PR2dTbI 6m kubelet-bootstrap Pending

2、审批node请求:

[k8s@database_1 dns]$ kubectl certificate approve node-csr-u6GJPmKrahi21mOeiQikVYO4ZmE4Aq-NnlK_PR2dTbI

certificatesigningrequest.certificates.k8s.io/node-csr-u6GJPmKrahi21mOeiQikVYO4ZmE4Aq-NnlK_PR2dTbI approved

3、查看node状态:

[k8s@database_1 dns]$ kubectl get node

NAME STATUS ROLES AGE VERSION

10.10.75.176 Ready 58s v1.11.0

10.10.78.19 Ready 4h v1.11.0

10.10.78.58 Ready 22m v1.11.0

4、给新增node添加角色并绑定:

[k8s@database_1 dns]$ kubectl create clusterrolebinding kubelet-node-clusterbinding176 --clusterrole=system:n

你可能感兴趣的:(kubectl查看node状态)