CLI / Kubernetes
kubectl
The Kubernetes command-line client for inspecting clusters and creating, updating, and troubleshooting resources.
Problem it solves
Why it exists.
It gives operators and developers a direct, scriptable interface to the Kubernetes API.
Optimized for
Where it shines.
Interactive cluster operations, diagnostics, automation scripts, and deployment workflows.
Use with care
Where not to use it.
Do not use broad destructive commands casually or bypass reviewed declarative workflows for production changes.
Components
What it is made of.
- Kubernetes API
- Contexts
- Resources
- Plugins
- Output formats
Process
How it works.
- kubectl loads the active context
- The command is translated into an API request
- The API server authenticates and authorizes it
- kubectl renders the response