Skip to content

kubectl get

Description

kubectl get lists Kubernetes resources in the cluster.

It is commonly used to inspect the current state of workloads and infrastructure components.

Syntax

kubectl get [resource] [flags]

Common Resource Types

Resource Description
pods Running containers
deployments Application deployments
services Network access points
nodes Cluster worker nodes

Examples

List Pods

kubectl get pods

List Pods with Additional Details

kubectl get pods -o wide

List Deployments

kubectl get deployments

Watch Resources in Real Time

kubectl get pods -w

Output Example

NAME        READY   STATUS    RESTARTS   AGE
nginx-pod   1/1     Running   0          2m


  • kubectl describe
  • kubectl logs