home / containers / kubectl

kubectl

Official · Kubernetes
3.2k

Kubernetes CLI for inspecting resources, applying manifests, managing kubeconfig, and operating workloads.

$brew install kubectl
Language
Go
Stars
3,231
Category
Containers & K8s
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

kubectl is the official command line client for talking to the Kubernetes API server and working with cluster state. It covers day-to-day inspection, apply and delete workflows, kubeconfig management, workload access, and cluster debugging.

What It Enables
  • Inspect resources, events, logs, current identity, API schema, and raw cluster responses across namespaces and contexts.
  • Apply, diff, patch, scale, label, annotate, and delete resources from files, stdin, or live targets, then wait for rollout or status conditions.
  • Operate workloads directly from the terminal with exec, logs, cp, port-forward, proxy, and kubeconfig context management commands.
Agent Fit
  • Wide output support including json, yaml, jsonpath, custom columns, and name output makes read paths easy to parse or narrow for follow-up steps.
  • Most commands are stable and non-interactive once credentials are in place, and dry-run, diff, and wait flows fit shell-based inspect-change-verify loops well.
  • The main limits are environmental rather than CLI design: agents still need a valid kubeconfig, reachable clusters, appropriate RBAC, and sometimes external cloud auth plugins.
Caveats
  • Useful operation depends on kubeconfig, cluster reachability, and the permissions attached to the active context.
  • Some managed-cluster logins require separate provider plugins because built-in cloud auth integrations were removed from kubectl.