kubectl

CLI

Kubernetes command-line tool for controlling clusters.

0 views

Installation

Homebrewbrew install kubectl

Links

License

Apache-2.0

AI Agent Notes

Control Kubernetes clusters: deploy, inspect, and manage workloads

When to use

Managing Kubernetes resources, debugging pods, checking cluster state

Examples
  • kubectl get pods
  • kubectl apply -f deploy.yaml
  • kubectl logs -f pod-name

Proven Recipes

List all pods in namespace🟢 99% success
kubectl get pods -n namespace
Tail logs from a pod🟢 98% success
kubectl logs -f pod-name -n namespace
Apply manifest file🟢 97% success
kubectl apply -f deploy.yaml
Get shell in running pod🟢 95% success
kubectl exec -it pod-name -- /bin/bash
⚠ Common failures (1)
  • OCI runtime errorUse /bin/sh if bash is not installed in the container