Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubectl pod vs pods

I have noticed that when using kubectl you can pretty much use pod and pods interchangeably. 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...

like image 820
Jonathan S Avatar asked Apr 29 '19 13:04

Jonathan S


People also ask

What are pods in Kubectl?

Pods are the smallest, most basic deployable objects in Kubernetes. A Pod represents a single instance of a running process in your cluster. Pods contain one or more containers, such as Docker containers. When a Pod runs multiple containers, the containers are managed as a single entity and share the Pod's resources.

Are Nodes and pods the same?

Pods are simply the smallest unit of execution in Kubernetes, consisting of one or more containers, each with one or more application and its binaries. Nodes are the physical servers or VMs that comprise a Kubernetes Cluster.

Is a pod a container Kubernetes?

A Kubernetes pod is a collection of one or more Linux® containers, and is the smallest unit of a Kubernetes application. Any given pod can be composed of multiple, tightly coupled containers (an advanced use case) or just a single container (a more common use case).


1 Answers

From the 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

It doesn't matter and both ways of writing will always result in the same result.

like image 60
Lukas Eichler Avatar answered Oct 22 '22 13:10

Lukas Eichler