โ† All skills
Tencent SkillHub ยท Developer Tools

kubectl

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.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

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.

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
README.md, SKILL.md, scripts/kubectl-cluster-info.sh, scripts/kubectl-deploy-update.sh, scripts/kubectl-pod-debug.sh, scripts/kubectl-node-drain.sh

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 21 sections Open source page

kubectl Skill

Execute Kubernetes cluster management operations using the kubectl command-line tool.

Overview

This skill enables agents to: Query Resources โ€” List and get details about pods, deployments, services, nodes, etc. Deploy & Update โ€” Create, apply, patch, and update Kubernetes resources Debug & Troubleshoot โ€” View logs, execute commands in containers, inspect events Manage Configuration โ€” Update kubeconfig, switch contexts, manage namespaces Monitor Health โ€” Check resource usage, rollout status, events, and pod conditions Perform Operations โ€” Scale deployments, drain nodes, manage taints and labels

Prerequisites

kubectl binary installed and accessible on PATH (v1.20+) kubeconfig file configured with cluster credentials (default: ~/.kube/config) Active connection to a Kubernetes cluster

Install kubectl

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

Query Resources

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

View Logs

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

Execute Commands

kubectl exec -it POD_NAME -- /bin/bash # Interactive shell kubectl exec POD_NAME -- COMMAND # Run single command

Deploy Applications

kubectl apply -f deployment.yaml # Apply config kubectl create -f deployment.yaml # Create resource kubectl apply -f deployment.yaml --dry-run=client # Test

Update Applications

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

Manage Configuration

kubectl config view # Show kubeconfig kubectl config get-contexts # List contexts kubectl config use-context CONTEXT # Switch context

Debugging a Pod

# 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'

Deploying a New Version

# 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

Preparing Node for Maintenance

# 1. Drain node (evicts all pods) kubectl drain NODE_NAME --ignore-daemonsets # 2. Do maintenance # ... # 3. Bring back online kubectl uncordon NODE_NAME

Output Formats

The --output (-o) flag supports multiple formats: table โ€” Default tabular format wide โ€” Extended table with additional columns json โ€” JSON format (useful with jq) yaml โ€” YAML format jsonpath โ€” JSONPath expressions custom-columns โ€” Define custom output columns name โ€” Only resource names Examples: 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

Global Flags (Available to All Commands)

-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 Modes

--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

Advanced Topics

For detailed reference material, command-by-command documentation, troubleshooting guides, and advanced workflows, see: references/REFERENCE.md โ€” Complete kubectl command reference scripts/ โ€” Helper scripts for common tasks

Helpful Tips

Use label selectors for bulk operations: kubectl delete pods -l app=myapp kubectl get pods -l env=prod,tier=backend Watch resources in real-time: kubectl get pods -w # Watch for changes Use -A flag for all namespaces: kubectl get pods -A # See pods everywhere Save outputs for later comparison: kubectl get deployment my-app -o yaml > deployment-backup.yaml Check before you delete: kubectl delete pod POD_NAME --dry-run=client

Getting Help

kubectl help # General help kubectl COMMAND --help # Command help kubectl explain pods # Resource documentation kubectl explain pods.spec # Field documentation

Environment Variables

KUBECONFIG โ€” Path to kubeconfig file (can include multiple paths separated by :) KUBECTL_CONTEXT โ€” Override default context

Resources

Official kubectl Docs kubectl Cheat Sheet Kubernetes API Reference Agent Skills Specification Version: 1.0.0 License: MIT Compatible with: kubectl v1.20+, Kubernetes v1.20+

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
4 Scripts2 Docs
  • SKILL.md Primary doc
  • README.md Docs
  • scripts/kubectl-cluster-info.sh Scripts
  • scripts/kubectl-deploy-update.sh Scripts
  • scripts/kubectl-node-drain.sh Scripts
  • scripts/kubectl-pod-debug.sh Scripts