Command line: kubectl

The main binary when managing Kubernetes clusters.

Subcommands

When referring to a specific resource with ${RESOURCE}/${NAME} — e.g., namespace/demo, deploy/hello.

Examples

As this is a massive tool, this needs massive examples.

Basic workflow example from a beginner's perspective

Say you want to deploy your application with Kubernetes akin to Docker with a single container.

# Get the description of the cluster.
kubectl cluster-info

# List all of the supported resources.
kubectl api-resources

# Create a deployment.
kubectl create deployment/hello-world --image=alpine

Backlinks