[root@dock01 ~]# kubectl get pods --help
Display one or many resources
显示一个或者多个资源
Prints a table of the most important information about the specified resources. You can filter the list using a label
selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current
namespace unless you pass --all-namespaces.
打印指定资源的一个最重要的信息表
你可以使用一个selector标签来过滤了表
如果描述的资源类型是naespace 你会看到你自己的namespace
除非你传递 --all-namespaces.
[root@dock01 ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
javaweb-2 0/1 Init:ImagePullBackOff 0 105m
nginx-deployment-676cdd9b-fhmzv 1/1 Running 1 3h6m
nginx-deployment-676cdd9b-tvk4b 1/1 Running 1 3h6m
[root@dock01 ~]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default javaweb-2 0/1 Init:ImagePullBackOff 0 105m
default nginx-deployment-676cdd9b-fhmzv 1/1 Running 1 3h5m
default nginx-deployment-676cdd9b-tvk4b 1/1 Running 1 3h5m
kube-system coredns-7f89b7bc75-djthn 1/1 Running 6 3d9h
kube-system coredns-7f89b7bc75-nnh49 1/1 Running 6 3d9h
kube-system etcd-dock01 1/1 Running 6 3d9h
kube-system kube-apiserver-dock01 1/1 Running 6 3d9h
kube-system kube-controller-manager-dock01 1/1 Running 7 3d9h
kube-system kube-proxy-2584p 1/1 Running 6 3d9h
kube-system kube-proxy-ks5mf 1/1 Running 4 3d7h
kube-system kube-scheduler-dock01 1/1 Running 6 3d9h
kube-system weave-net-hp8hd 2/2 Running 12 3d7h
kube-system weave-net-tp487 2/2 Running 17 3d8h
kubernetes-dashboard dashboard-metrics-scraper-7445d59dfd-mlx2q 1/1 Running 4 2d23h
kubernetes-dashboard kubernetes-dashboard-7d8466d688-tk6nb 1/1 Running 2 2d23h
rook-ceph csi-cephfsplugin-provisioner-6748bb9646-67hlv 5/5 Running 14 28h
rook-ceph csi-cephfsplugin-provisioner-6748bb9646-jkb7q 0/5 Pending 0 28h
rook-ceph csi-cephfsplugin-wwxz2 3/3 Running 4 28h
rook-ceph csi-rbdplugin-hv58v 3/3 Running 4 28h
rook-ceph csi-rbdplugin-provisioner-78db9f787f-dr2js 0/6 Pending 0 28h
rook-ceph csi-rbdplugin-provisioner-78db9f787f-s2f55 6/6 Running 17 28h
rook-ceph rook-ceph-crashcollector-dock02-6ff8c5bb7b-ggk4c 0/1 Init:0/2 0 156m
rook-ceph rook-ceph-mon-a-canary-594b9f5d44-2k8k8 0/1 Terminating 0 2m38s
rook-ceph rook-ceph-mon-b-canary-79b9b5d9df-sttlx 0/1 Pending 0 2m36s
rook-ceph rook-ceph-operator-8d9bf87c-t8w4g 1/1 Running 6 28h
rook-ceph rook-discover-9x7z6 1/1 Running 1
本文链接:https://my.lmcjl.com/post/9836.html
4 评论