kubectl-skill
Execute 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.
Why use this skill?
Manage your Kubernetes infrastructure directly from OpenClaw. Execute kubectl commands, monitor cluster health, troubleshoot pods, and automate deployments seamlessly.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ddevaal/kubectlWhat This Skill Does
The kubectl-skill provides a comprehensive interface for OpenClaw agents to interact with Kubernetes clusters. It acts as an abstraction layer over the standard kubectl command-line utility, enabling the agent to perform administrative tasks, debugging, and resource management programmatically. By leveraging this skill, the agent can inspect cluster health, automate deployments, and troubleshoot container-level issues in real-time. Whether you are managing microservices, analyzing pod failures, or performing routine cluster maintenance, this skill bridges the gap between high-level intent and low-level cluster orchestration.
Installation
To integrate the skill into your environment, use the OpenClaw repository command:
clawhub install openclaw/skills/skills/ddevaal/kubectl
Ensure that the environment where the agent is running has kubectl pre-installed (version 1.20+) and that a valid kubeconfig file is located at ~/.kube/config. The agent must also have appropriate RBAC permissions within the cluster to execute the desired operations.
Use Cases
- Automated Incident Response: The agent can automatically fetch logs and describe events when a pod enters a crash-loop state.
- CI/CD Pipeline Integration: Seamlessly apply configuration changes or update container images based on build triggers.
- Operational Monitoring: Perform periodic checks on node capacity or deployment rollout statuses to ensure high availability.
- Interactive Troubleshooting: Use the agent to bridge the gap between error detection and initial remediation via remote execution.
Example Prompts
- "Check the logs for the service 'order-api' in the 'prod' namespace and tell me if there are any database connection errors."
- "Identify all nodes with high CPU usage and provide a summary of the current resource distribution."
- "Restart the deployment 'auth-service' and monitor the rollout to ensure all replicas are ready."
Tips & Limitations
- Context Awareness: Always verify the active context before running destructive commands. The agent defaults to the current context in
~/.kube/config. - Safety First: Avoid using
kubectl deletecommands without specific safeguards; preferapplyfor idempotent state updates. - Namespace Scope: Always specify the namespace to avoid accidental cross-environment operations.
- Log Volume: For pods with heavy traffic, requesting all logs may overwhelm the agent's context window; specify time ranges or tail limits when possible.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ddevaal-kubectl": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-read, code-execution