一、命令格式
kubectl get 资源名称
二、支持的资源名称如下
- all
- certificatesigningrequests (可简写为"csr")
- clusterrolebindings
- clusterrol
- componentstatuses (可简写为"cs")
- configmaps (可简写为"cm")
- controllerrevisions
- cronjobs
- customresourcedefinition (可简写为"crd")
- daemonsets (可简写为"ds")
- deployments (可简写为"deploy")
- endpoints (可简写为"ep")
- events (可简写为"ev")
- horizontalpodautoscalers (aka ‘hpa’)
- ingresses (可简写为"ing")
- jobs
- limitranges (可简写为"limits")
- namespaces (可简写为"ns")
- networkpolicies (可简写为"netpol")
- nodes (可简写为"no")
- persistentvolumeclaims (可简写为"pvc")
- persistentvolumes (可简写为"pv")
- poddisruptionbudgets (可简写为"pdb")
- podpreset
- pods (可简写为"po")
- podsecuritypolicies (可简写为"psp"