Kubectl pod 对比 pods

Kubectl pod vs pods

我注意到,在使用 kubectl 时,您几乎可以互换使用 podpods。有没有任何情况下使用一个而不是另一个会得到不同的结果,或者你可以只使用其中一个而不用担心它?

例如:

kubectl get pods
kubectl get pod

kubectl describe pod/app
kubectl describe pods/app

等等...

来自kubectl documentation

Resource types are case-insensitive and you can specify the singular, plural, or abbreviated forms. For example, the following commands produce the same output:

kubectl get pod pod1
kubectl get pods pod1   
kubectl get po pod1

没关系,两种写法的结果总是一样的。