简体   繁体   English

Kubectl pod与豆荚

[英]Kubectl pod vs pods

I have noticed that when using kubectl you can pretty much use pod and pods interchangeably. 我已经注意到使用kubectl你几乎可以使用吊舱豆荚交替时。 Is there any instance when using one instead of the other could get you different results or can you just use either without worrying about it? 是否有任何实例,当使用一个而不是另一个可以得到不同的结果或你可以只使用其中之一而不用担心它?

For example: 例如:

kubectl get pods
kubectl get pod

kubectl describe pod/app
kubectl describe pods/app

and so on... 等等...

From the kubectl documentation : kubectl文档

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 

It doesn't matter and both ways of writing will always result in the same result. 这无关紧要,两种写作方式总会产生相同的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 kubectl apply表示创建了pod,但是get pods没有显示 - kubectl apply says pod created however get pods shows nothing Kubernetes容器/容器正在运行但未与“ kubectl get容器”一起列出? - Kubernetes pod/containers running but not listed with 'kubectl get pods'? kubectl 删除 pod 与设置环境 - kubectl delete pod vs set env Kubernetes kubectl 补丁 pod 与删除/创建 pod - Kubernetes kubectl patch pod vs delete/create pod 在 kubectl 推出状态后获取新的 pod 名称之一 | kubectl get pods --field-selector 返回终止 pods - get one of new pod name after kubectl rollout status | kubectl get pods --field-selector returns Terminating pods 在Kubernetes上运行2个Pod对比1个更大的Pod? - running 2 pods vs 1 larger pod on Kubernetes? Kubernetes - 使用 kubectl 显示当前 pod 与容量 - Kubernetes - display current pods vs. capacity with kubectl kubectl 删除 pod 与单击 GKE Web ui 上的删除按钮 - kubectl delete pod vs click delete button on GKE web ui 为什么我执行 cmd 'kubectl get pods',pod 状态是 'NotReady'? 不合理,这个状态属于节点状态 - why i execute cmd 'kubectl get pods', the pod status is 'NotReady'? it's unreasonable, this status is belong to node status 如何获取特定 pod 或容器的状态:kubectl get pods using jsonpath - How to get status of a particular pod or container : kubectl get pods using jsonpath
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM