kubectl get

The kubectl command that lists objects of one or more types, or shows one object, in a table or another output format.

In more detail

It shows current state only; for history and reasons use kubectl describe and events. Add -o wide for extra columns such as the pod IP address and node, -o yaml for the full object, or -l to filter by label. Short names such as deploy, svc, cm, pvc and ds save typing.

Examples

kubectl get deploy,rs
kubectl get pods -l app=web -o wide

Related terms

Taught in

References

Certification courses