kubectlExecute and manage Kubernetes clusters via kubectl commands. Query resources, deploy applications, debug containers, manage configurations, and monitor cluster health. Use when working with Kubernetes clusters, containers, deployments, or pod diagnostics.
Install via ClawdBot CLI:
clawdbot install ddevaal/kubectlExecute Kubernetes cluster management operations using the kubectl command-line tool.
This skill enables agents to:
~/.kube/config)macOS:
brew install kubernetes-cli
Linux:
apt-get install -y kubectl # Ubuntu/Debian
yum install -y kubectl # RHEL/CentOS
Verify:
kubectl version --client
kubectl cluster-info # Test connection
kubectl get pods # List all pods in current namespace
kubectl get pods -A # All namespaces
kubectl get pods -o wide # More columns
kubectl get nodes # List nodes
kubectl describe pod POD_NAME # Detailed info with events
kubectl logs POD_NAME # Get logs
kubectl logs -f POD_NAME # Follow logs (tail -f)
kubectl logs POD_NAME -c CONTAINER # Specific container
kubectl logs POD_NAME --previous # Previous container logs
kubectl exec -it POD_NAME -- /bin/bash # Interactive shell
kubectl exec POD_NAME -- COMMAND # Run single command
kubectl apply -f deployment.yaml # Apply config
kubectl create -f deployment.yaml # Create resource
kubectl apply -f deployment.yaml --dry-run=client # Test
kubectl set image deployment/APP IMAGE=IMAGE:TAG # Update image
kubectl scale deployment/APP --replicas=3 # Scale pods
kubectl rollout status deployment/APP # Check status
kubectl rollout undo deployment/APP # Rollback
kubectl config view # Show kubeconfig
kubectl config get-contexts # List contexts
kubectl config use-context CONTEXT # Switch context
# 1. Identify the issue
kubectl describe pod POD_NAME
# 2. Check logs
kubectl logs POD_NAME
kubectl logs POD_NAME --previous
# 3. Execute debug commands
kubectl exec -it POD_NAME -- /bin/bash
# 4. Check events
kubectl get events --sort-by='.lastTimestamp'
# 1. Update image
kubectl set image deployment/MY_APP my-app=my-app:v2
# 2. Monitor rollout
kubectl rollout status deployment/MY_APP -w
# 3. Verify
kubectl get pods -l app=my-app
# 4. Rollback if needed
kubectl rollout undo deployment/MY_APP
# 1. Drain node (evicts all pods)
kubectl drain NODE_NAME --ignore-daemonsets
# 2. Do maintenance
# ...
# 3. Bring back online
kubectl uncordon NODE_NAME
The --output (-o) flag supports multiple formats:
table ā Default tabular formatwide ā Extended table with additional columnsjson ā JSON format (useful with jq)yaml ā YAML formatjsonpath ā JSONPath expressionscustom-columns ā Define custom output columnsname ā Only resource namesExamples:
kubectl get pods -o json | jq '.items[0].metadata.name'
kubectl get pods -o jsonpath='{.items[*].metadata.name}'
kubectl get pods -o custom-columns=NAME:.metadata.name,STATUS:.status.phase
-n, --namespace=<ns> # Operate in specific namespace
-A, --all-namespaces # Operate across all namespaces
--context=<context> # Use specific kubeconfig context
-o, --output=<format> # Output format (json, yaml, table, etc.)
--dry-run=<mode> # Dry-run mode (none, client, server)
-l, --selector=<labels> # Filter by labels
--field-selector=<selector> # Filter by fields
-v, --v=<int> # Verbosity level (0-9)
--dry-run=client ā Fast client-side validation (test commands safely)--dry-run=server ā Server-side validation (more accurate)--dry-run=none ā Execute for real (default)Always test with --dry-run=client first:
kubectl apply -f manifest.yaml --dry-run=client
For detailed reference material, command-by-command documentation, troubleshooting guides, and advanced workflows, see:
kubectl delete pods -l app=myapp
kubectl get pods -l env=prod,tier=backend
kubectl get pods -w # Watch for changes
-A flag for all namespaces:
kubectl get pods -A # See pods everywhere
kubectl get deployment my-app -o yaml > deployment-backup.yaml
kubectl delete pod POD_NAME --dry-run=client
kubectl help # General help
kubectl COMMAND --help # Command help
kubectl explain pods # Resource documentation
kubectl explain pods.spec # Field documentation
KUBECONFIG ā Path to kubeconfig file (can include multiple paths separated by :)KUBECTL_CONTEXT ā Override default contextVersion: 1.0.0
License: MIT
Compatible with: kubectl v1.20+, Kubernetes v1.20+
Generated Mar 1, 2026
A software development team uses the kubectl skill to deploy microservices to a Kubernetes cluster in a cloud environment. They apply YAML manifests for deployments, services, and configmaps, and monitor rollout status to ensure zero-downtime updates. This enables rapid iteration and scaling of applications across development, staging, and production environments.
A DevOps engineer leverages the skill to diagnose issues in a production Kubernetes cluster. They query pod logs, describe resource events, and execute commands in containers to identify root causes like memory leaks or configuration errors. This reduces mean time to resolution and improves system reliability through proactive monitoring and debugging.
A SaaS provider uses kubectl to manage isolated namespaces for different customers on a shared Kubernetes cluster. They scale deployments based on demand, update configurations for tenant-specific settings, and ensure resource quotas are enforced. This supports efficient resource utilization and secure multi-tenancy in a scalable cloud infrastructure.
An IoT company employs the skill to manage Kubernetes clusters deployed on edge devices in remote locations. They drain nodes for maintenance, update container images over limited bandwidth, and monitor pod health across distributed nodes. This ensures high availability and automated operations for edge computing applications in industries like manufacturing or logistics.
A data engineering team uses kubectl to orchestrate batch jobs and data pipelines on Kubernetes, such as running Spark or Airflow workloads. They create jobs, check pod status for completion, and manage configurations for data processing tasks. This enables scalable, containerized data workflows that integrate with cloud storage and analytics services.
A cloud provider or consultancy offers managed Kubernetes services, using the kubectl skill to automate cluster provisioning, scaling, and maintenance for clients. They charge subscription fees based on cluster size, support levels, and additional features like monitoring or backup. This model reduces operational overhead for customers while generating recurring revenue.
A software company develops platforms that integrate kubectl for CI/CD pipelines, infrastructure as code, and automated testing. They sell licenses or SaaS subscriptions to development teams, with revenue from enterprise deals and usage-based pricing. This model accelerates software delivery and enhances developer productivity through streamlined Kubernetes operations.
An education provider creates courses and certifications focused on Kubernetes and kubectl skills, targeting IT professionals and developers. They generate revenue from course fees, certification exams, and corporate training packages. This model capitalizes on the growing demand for cloud-native expertise in the job market.
š¬ Integration Tip
Integrate this skill with existing CI/CD tools like Jenkins or GitLab CI to automate deployments, and use kubeconfig management to securely switch between multiple cluster contexts for different environments.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.