搜索

PythonReactSEOPDF
OpenClaw

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.

ddevaal0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install ddevaal/kubectl

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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

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

Quick Setup

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

Essential Commands

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

来源信息

Source
github
Repository
openclaw/skills
Path
skills/ddevaal/kubectl
Version
—
Commit
3ebe5c656162f7fcd5f4e6e76093e2c4e9c58c05
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

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 ClawdHub
clawdhub 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): ~/.clawdbot/skills/
  • Extra skills folder: Configured via ~/.clawdbot/clawdbot.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...

来源内容

SKILL.md
# 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

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

## Quick Setup

### Install kubectl

**macOS:**
```bash
brew install kubernetes-cli
```

**Linux:**
```bash
apt-get install -y kubectl  # Ubuntu/Debian
yum install -y kubectl      # RHEL/CentOS
```

**Verify:**
```bash
kubectl version --client
kubectl cluster-info  # Test connection
```

## Essential Commands

### Query Resources
```bash
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
```bash
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
```bash
kubectl exec -it POD_NAME -- /bin/bash   # Interactive shell
kubectl exec POD_NAME -- COMMAND         # Run single command
```

### Deploy Applications
```bash
kubectl apply -f deployment.yaml...
README
# 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 ClawdHub
```bash
clawdhub 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): `~/.clawdbot/skills/`
- **Extra skills folder**: Configured via `~/.clawdbot/clawdbot.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
```bash
kubectl version --client
kubectl cluster-info
```

### Basic Commands
```bash
# 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:
```bash
chmod +x scripts/*.sh
```

### Debug a Pod
```bash
./scripts/kubectl-pod-debug.sh POD_NAME [NAMESPACE]
```

### Update Deployment Image
```bash
./scripts/kubectl-deploy-update.sh DEPLOYMENT CONTAINER IMAGE [NAMESPACE]
```

### Drain Node for Maintenance
```bash
./scripts/kubectl-node-drain.sh NODE_NAME
```

### Check Cluster Health
```bash
./scripts/kubectl-cluster-info.sh
```

## Structure

```
kubectl-skill/
├── SKILL.md                    # Main skill instructions
├── LICENSE...

相关技能

OpenClaw

agent-pack-n-go

aicodelion

🚀 Clone your OpenClaw AI Agent to a new device in ~25 minutes — configs, memory, skills, everything.

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

cacheforge-skills

cacheforge-ai

⚡ SOTA agent skills for OpenClaw — observability, security, code quality, incident response, and more. Built by Anvil AI.

OpenClaw

restart-guard

zjianru

OpenClaw Skill: Safely restart the Gateway with context preservation, guardian watchdog, and multi-channel notification