Agent skill
kubectl
Manage Kubernetes clusters, deployments, pods, and services using kubectl.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/kubectl
Metadata
Additional technical details for this skill
- thinkfleetbot
-
{ "emoji": "\u2638\ufe0f", "requires": { "bins": [ "kubectl" ] } }
SKILL.md
kubectl
Manage Kubernetes clusters using kubectl CLI.
Environment Variables
KUBECONFIG- Path to kubeconfig file (optional, defaults to~/.kube/config)
Cluster info
kubectl cluster-info
kubectl get nodes -o wide
List resources
kubectl get pods -A --no-headers | head -30
kubectl get deployments -n default
kubectl get services -n default
kubectl get namespaces
Describe a resource
kubectl describe pod my-pod -n default
kubectl describe deployment my-app -n default
View logs
kubectl logs deployment/my-app -n default --tail=50
kubectl logs my-pod -n default -c my-container --tail=100
Scale deployment
kubectl scale deployment my-app --replicas=3 -n default
Restart deployment (rolling)
kubectl rollout restart deployment/my-app -n default
Rollout status
kubectl rollout status deployment/my-app -n default
Rollout history
kubectl rollout history deployment/my-app -n default
Apply manifest
kubectl apply -f /tmp/manifest.yaml
Get resource as YAML
kubectl get deployment my-app -n default -o yaml
Port forward
kubectl port-forward svc/my-service 8080:80 -n default &
Get events
kubectl get events -n default --sort-by='.lastTimestamp' | tail -20
Top (resource usage)
kubectl top pods -n default
kubectl top nodes
Notes
- Always specify
-n namespaceto avoid operating on the wrong namespace. - Use
--dry-run=client -o yamlto preview changes before applying. - Confirm before running destructive operations (delete, scale to 0, drain).
- For multi-cluster setups, use
kubectl config use-contextto switch contexts.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?