kubectl Skill

An Agent Skills-compatible skill package for kubectl command-line operations on Kubernetes clusters.

What's Included

  • SKILL.md — Main skill instructions (AgentSkills format)
  • references/REFERENCE.md — Complete command reference
  • scripts/ — Helper scripts for common workflows
    • kubectl-pod-debug.sh — Comprehensive pod debugging
    • kubectl-deploy-update.sh — Safe deployment image updates with monitoring
    • kubectl-node-drain.sh — Safe node maintenance with confirmation
    • kubectl-cluster-info.sh — Cluster health check

Installation

Via Skills

skills install kubectl-skill

Manual Installation

Copy the kubectl-skill directory to one of these locations:

  • Workspace skills (per-project): <workspace>/skills/
  • Local skills (user-wide): ~/.bot/skills/
  • Extra skills folder: Configured via ~/.bot/bot.json

Requirements

  • kubectl v1.20+ installed and on PATH
  • kubeconfig file configured with cluster access
  • Active connection to a Kubernetes cluster

Quick Start

Verify Installation

kubectl version --client
kubectl cluster-info

Basic Commands

# List pods
kubectl get pods -A

# View logs
kubectl logs POD_NAME

# Execute in pod
kubectl exec -it POD_NAME -- /bin/bash

# Apply configuration
kubectl apply -f deployment.yaml

# Scale deployment
kubectl scale deployment/APP --replicas=3

Helper Scripts

Make scripts executable first:

chmod +x scripts/*.sh

Debug a Pod

./scripts/kubectl-pod-debug.sh POD_NAME [NAMESPACE]

Update Deployment Image

./scripts/kubectl-deploy-update.sh DEPLOYMENT CONTAINER IMAGE [NAMESPACE]

Drain Node for Maintenance

./scripts/kubectl-node-drain.sh NODE_NAME

Check Cluster Health

./scripts/kubectl-cluster-info.sh

Structure

kubectl-skill/
├── SKILL.md                    # Main skill instructions
├── LICENSE                     # MIT License
├── README.md                   # This file
├── references/
│   └── REFERENCE.md           # Complete command reference
├── scripts/
│   ├── kubectl-pod-debug.sh
│   ├── kubectl-deploy-update.sh
│   ├── kubectl-node-drain.sh
│   └── kubectl-cluster-info.sh
└── assets/                    # (Optional) For future additions

Key Features

✅ Query and inspect Kubernetes resources
✅ Deploy and update applications
✅ Debug pods and containers
✅ Manage cluster configuration
✅ Monitor resource usage and health
✅ Execute commands in running containers
✅ View logs and events
✅ Port forwarding for local testing
✅ Node maintenance operations
✅ Dry-run support for safe operations

Environment Variables

  • KUBECONFIG — Path to kubeconfig file (can include multiple paths separated by :)
  • KUBECTLDIR — Directory for kubectl plugins (optional)

Documentation

Compatibility

  • kubectl versions: v1.20+
  • Kubernetes versions: v1.20+
  • Platforms: macOS, Linux, Windows (WSL)
  • Agent frameworks: Any that supports AgentSkills format

Contributing

This skill is part of the Bot project. To contribute:

  1. Test changes locally
  2. Update documentation
  3. Ensure scripts are executable and tested
  4. Submit pull request with clear description

License

MIT License — See LICENSE file for details

Support


Version: 1.0.0
Last Updated: January 24, 2026
Maintainer: Bot Contributors

S
Description
Hanzo Bot skill: kubectl (by ddevaal)
Readme
37 KiB
Languages
Shell 100%