[root@vic-master ~]# kubectl get ns
NAME STATUS AGE
default Active 32d
development Active 31d
kube-node-lease Active 32d
kube-public Active 32d
kube-system Active 32d
查看所有的节点 node 可简写为 no
[root@vic-master ~]# kubectl get no
NAME STATUS ROLES AGE VERSION
vic-master Ready master 33d v1.14.0
vic-node1 Ready <none> 32d v1.14.0
vic-node2 Ready <none> 32d v1.14.0
查询 pod , pod 简写为 po , 这里默认的命名空间的 default
[root@vic-master ~]# kubectl get po
NAME READY STATUS RESTARTS AGE
frontend 1/1 Running 0 31d
myapp-54fc6bbfbd-f6cpk 1/1 Running 0 20h
myapp-54fc6bbfbd-zmb2v 1/1 Running 0 20h
ng-dep-679f4c7695-mw62d 1/1 Running 0 21h
redis-php 2/2 Running 0 30d
k8s CLI 操作笔记k8s 获取所有的命名空间 namspace 可简写为 ns[root@vic-master ~]# kubectl get nsNAME STATUS AGEdefault Active 32ddevelopment Active 31dkube-node-lease Acti...