{
  "schemaVersion": "1.0",
  "item": {
    "slug": "kubectl",
    "name": "kubectl",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ddevaal/kubectl",
    "canonicalUrl": "https://clawhub.ai/ddevaal/kubectl",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/kubectl",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=kubectl",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/kubectl-cluster-info.sh",
      "scripts/kubectl-deploy-update.sh",
      "scripts/kubectl-pod-debug.sh",
      "scripts/kubectl-node-drain.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/kubectl"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/kubectl",
    "agentPageUrl": "https://openagent3.xyz/skills/kubectl/agent",
    "manifestUrl": "https://openagent3.xyz/skills/kubectl/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/kubectl/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "kubectl Skill",
        "body": "Execute Kubernetes cluster management operations using the kubectl command-line tool."
      },
      {
        "title": "Overview",
        "body": "This skill enables agents to:\n\nQuery Resources — List and get details about pods, deployments, services, nodes, etc.\nDeploy & Update — Create, apply, patch, and update Kubernetes resources\nDebug & Troubleshoot — View logs, execute commands in containers, inspect events\nManage Configuration — Update kubeconfig, switch contexts, manage namespaces\nMonitor Health — Check resource usage, rollout status, events, and pod conditions\nPerform Operations — Scale deployments, drain nodes, manage taints and labels"
      },
      {
        "title": "Prerequisites",
        "body": "kubectl binary installed and accessible on PATH (v1.20+)\nkubeconfig file configured with cluster credentials (default: ~/.kube/config)\nActive connection to a Kubernetes cluster"
      },
      {
        "title": "Install kubectl",
        "body": "macOS:\n\nbrew install kubernetes-cli\n\nLinux:\n\napt-get install -y kubectl  # Ubuntu/Debian\nyum install -y kubectl      # RHEL/CentOS\n\nVerify:\n\nkubectl version --client\nkubectl cluster-info  # Test connection"
      },
      {
        "title": "Query Resources",
        "body": "kubectl get pods                    # List all pods in current namespace\nkubectl get pods -A                 # All namespaces\nkubectl get pods -o wide            # More columns\nkubectl get nodes                   # List nodes\nkubectl describe pod POD_NAME        # Detailed info with events"
      },
      {
        "title": "View Logs",
        "body": "kubectl logs POD_NAME                # Get logs\nkubectl logs -f POD_NAME             # Follow logs (tail -f)\nkubectl logs POD_NAME -c CONTAINER   # Specific container\nkubectl logs POD_NAME --previous     # Previous container logs"
      },
      {
        "title": "Execute Commands",
        "body": "kubectl exec -it POD_NAME -- /bin/bash   # Interactive shell\nkubectl exec POD_NAME -- COMMAND         # Run single command"
      },
      {
        "title": "Deploy Applications",
        "body": "kubectl apply -f deployment.yaml         # Apply config\nkubectl create -f deployment.yaml        # Create resource\nkubectl apply -f deployment.yaml --dry-run=client  # Test"
      },
      {
        "title": "Update Applications",
        "body": "kubectl set image deployment/APP IMAGE=IMAGE:TAG  # Update image\nkubectl scale deployment/APP --replicas=3          # Scale pods\nkubectl rollout status deployment/APP              # Check status\nkubectl rollout undo deployment/APP                # Rollback"
      },
      {
        "title": "Manage Configuration",
        "body": "kubectl config view                  # Show kubeconfig\nkubectl config get-contexts          # List contexts\nkubectl config use-context CONTEXT   # Switch context"
      },
      {
        "title": "Debugging a Pod",
        "body": "# 1. Identify the issue\nkubectl describe pod POD_NAME\n\n# 2. Check logs\nkubectl logs POD_NAME\nkubectl logs POD_NAME --previous\n\n# 3. Execute debug commands\nkubectl exec -it POD_NAME -- /bin/bash\n\n# 4. Check events\nkubectl get events --sort-by='.lastTimestamp'"
      },
      {
        "title": "Deploying a New Version",
        "body": "# 1. Update image\nkubectl set image deployment/MY_APP my-app=my-app:v2\n\n# 2. Monitor rollout\nkubectl rollout status deployment/MY_APP -w\n\n# 3. Verify\nkubectl get pods -l app=my-app\n\n# 4. Rollback if needed\nkubectl rollout undo deployment/MY_APP"
      },
      {
        "title": "Preparing Node for Maintenance",
        "body": "# 1. Drain node (evicts all pods)\nkubectl drain NODE_NAME --ignore-daemonsets\n\n# 2. Do maintenance\n# ...\n\n# 3. Bring back online\nkubectl uncordon NODE_NAME"
      },
      {
        "title": "Output Formats",
        "body": "The --output (-o) flag supports multiple formats:\n\ntable — Default tabular format\nwide — Extended table with additional columns\njson — JSON format (useful with jq)\nyaml — YAML format\njsonpath — JSONPath expressions\ncustom-columns — Define custom output columns\nname — Only resource names\n\nExamples:\n\nkubectl get pods -o json | jq '.items[0].metadata.name'\nkubectl get pods -o jsonpath='{.items[*].metadata.name}'\nkubectl get pods -o custom-columns=NAME:.metadata.name,STATUS:.status.phase"
      },
      {
        "title": "Global Flags (Available to All Commands)",
        "body": "-n, --namespace=<ns>           # Operate in specific namespace\n-A, --all-namespaces           # Operate across all namespaces\n--context=<context>            # Use specific kubeconfig context\n-o, --output=<format>          # Output format (json, yaml, table, etc.)\n--dry-run=<mode>               # Dry-run mode (none, client, server)\n-l, --selector=<labels>        # Filter by labels\n--field-selector=<selector>    # Filter by fields\n-v, --v=<int>                  # Verbosity level (0-9)"
      },
      {
        "title": "Dry-Run Modes",
        "body": "--dry-run=client — Fast client-side validation (test commands safely)\n--dry-run=server — Server-side validation (more accurate)\n--dry-run=none — Execute for real (default)\n\nAlways test with --dry-run=client first:\n\nkubectl apply -f manifest.yaml --dry-run=client"
      },
      {
        "title": "Advanced Topics",
        "body": "For detailed reference material, command-by-command documentation, troubleshooting guides, and advanced workflows, see:\n\nreferences/REFERENCE.md — Complete kubectl command reference\nscripts/ — Helper scripts for common tasks"
      },
      {
        "title": "Helpful Tips",
        "body": "Use label selectors for bulk operations:\nkubectl delete pods -l app=myapp\nkubectl get pods -l env=prod,tier=backend\n\n\n\nWatch resources in real-time:\nkubectl get pods -w  # Watch for changes\n\n\n\nUse -A flag for all namespaces:\nkubectl get pods -A  # See pods everywhere\n\n\n\nSave outputs for later comparison:\nkubectl get deployment my-app -o yaml > deployment-backup.yaml\n\n\n\nCheck before you delete:\nkubectl delete pod POD_NAME --dry-run=client"
      },
      {
        "title": "Getting Help",
        "body": "kubectl help                      # General help\nkubectl COMMAND --help            # Command help\nkubectl explain pods              # Resource documentation\nkubectl explain pods.spec         # Field documentation"
      },
      {
        "title": "Environment Variables",
        "body": "KUBECONFIG — Path to kubeconfig file (can include multiple paths separated by :)\nKUBECTL_CONTEXT — Override default context"
      },
      {
        "title": "Resources",
        "body": "Official kubectl Docs\nkubectl Cheat Sheet\nKubernetes API Reference\nAgent Skills Specification\n\nVersion: 1.0.0\nLicense: MIT\nCompatible with: kubectl v1.20+, Kubernetes v1.20+"
      }
    ],
    "body": "kubectl Skill\n\nExecute Kubernetes cluster management operations using the kubectl command-line tool.\n\nOverview\n\nThis skill enables agents to:\n\nQuery Resources — List and get details about pods, deployments, services, nodes, etc.\nDeploy & Update — Create, apply, patch, and update Kubernetes resources\nDebug & Troubleshoot — View logs, execute commands in containers, inspect events\nManage Configuration — Update kubeconfig, switch contexts, manage namespaces\nMonitor Health — Check resource usage, rollout status, events, and pod conditions\nPerform Operations — Scale deployments, drain nodes, manage taints and labels\nPrerequisites\nkubectl binary installed and accessible on PATH (v1.20+)\nkubeconfig file configured with cluster credentials (default: ~/.kube/config)\nActive connection to a Kubernetes cluster\nQuick Setup\nInstall kubectl\n\nmacOS:\n\nbrew install kubernetes-cli\n\n\nLinux:\n\napt-get install -y kubectl  # Ubuntu/Debian\nyum install -y kubectl      # RHEL/CentOS\n\n\nVerify:\n\nkubectl version --client\nkubectl cluster-info  # Test connection\n\nEssential Commands\nQuery Resources\nkubectl get pods                    # List all pods in current namespace\nkubectl get pods -A                 # All namespaces\nkubectl get pods -o wide            # More columns\nkubectl get nodes                   # List nodes\nkubectl describe pod POD_NAME        # Detailed info with events\n\nView Logs\nkubectl logs POD_NAME                # Get logs\nkubectl logs -f POD_NAME             # Follow logs (tail -f)\nkubectl logs POD_NAME -c CONTAINER   # Specific container\nkubectl logs POD_NAME --previous     # Previous container logs\n\nExecute Commands\nkubectl exec -it POD_NAME -- /bin/bash   # Interactive shell\nkubectl exec POD_NAME -- COMMAND         # Run single command\n\nDeploy Applications\nkubectl apply -f deployment.yaml         # Apply config\nkubectl create -f deployment.yaml        # Create resource\nkubectl apply -f deployment.yaml --dry-run=client  # Test\n\nUpdate Applications\nkubectl set image deployment/APP IMAGE=IMAGE:TAG  # Update image\nkubectl scale deployment/APP --replicas=3          # Scale pods\nkubectl rollout status deployment/APP              # Check status\nkubectl rollout undo deployment/APP                # Rollback\n\nManage Configuration\nkubectl config view                  # Show kubeconfig\nkubectl config get-contexts          # List contexts\nkubectl config use-context CONTEXT   # Switch context\n\nCommon Patterns\nDebugging a Pod\n# 1. Identify the issue\nkubectl describe pod POD_NAME\n\n# 2. Check logs\nkubectl logs POD_NAME\nkubectl logs POD_NAME --previous\n\n# 3. Execute debug commands\nkubectl exec -it POD_NAME -- /bin/bash\n\n# 4. Check events\nkubectl get events --sort-by='.lastTimestamp'\n\nDeploying a New Version\n# 1. Update image\nkubectl set image deployment/MY_APP my-app=my-app:v2\n\n# 2. Monitor rollout\nkubectl rollout status deployment/MY_APP -w\n\n# 3. Verify\nkubectl get pods -l app=my-app\n\n# 4. Rollback if needed\nkubectl rollout undo deployment/MY_APP\n\nPreparing Node for Maintenance\n# 1. Drain node (evicts all pods)\nkubectl drain NODE_NAME --ignore-daemonsets\n\n# 2. Do maintenance\n# ...\n\n# 3. Bring back online\nkubectl uncordon NODE_NAME\n\nOutput Formats\n\nThe --output (-o) flag supports multiple formats:\n\ntable — Default tabular format\nwide — Extended table with additional columns\njson — JSON format (useful with jq)\nyaml — YAML format\njsonpath — JSONPath expressions\ncustom-columns — Define custom output columns\nname — Only resource names\n\nExamples:\n\nkubectl get pods -o json | jq '.items[0].metadata.name'\nkubectl get pods -o jsonpath='{.items[*].metadata.name}'\nkubectl get pods -o custom-columns=NAME:.metadata.name,STATUS:.status.phase\n\nGlobal Flags (Available to All Commands)\n-n, --namespace=<ns>           # Operate in specific namespace\n-A, --all-namespaces           # Operate across all namespaces\n--context=<context>            # Use specific kubeconfig context\n-o, --output=<format>          # Output format (json, yaml, table, etc.)\n--dry-run=<mode>               # Dry-run mode (none, client, server)\n-l, --selector=<labels>        # Filter by labels\n--field-selector=<selector>    # Filter by fields\n-v, --v=<int>                  # Verbosity level (0-9)\n\nDry-Run Modes\n--dry-run=client — Fast client-side validation (test commands safely)\n--dry-run=server — Server-side validation (more accurate)\n--dry-run=none — Execute for real (default)\n\nAlways test with --dry-run=client first:\n\nkubectl apply -f manifest.yaml --dry-run=client\n\nAdvanced Topics\n\nFor detailed reference material, command-by-command documentation, troubleshooting guides, and advanced workflows, see:\n\nreferences/REFERENCE.md — Complete kubectl command reference\nscripts/ — Helper scripts for common tasks\nHelpful Tips\n\nUse label selectors for bulk operations:\n\nkubectl delete pods -l app=myapp\nkubectl get pods -l env=prod,tier=backend\n\n\nWatch resources in real-time:\n\nkubectl get pods -w  # Watch for changes\n\n\nUse -A flag for all namespaces:\n\nkubectl get pods -A  # See pods everywhere\n\n\nSave outputs for later comparison:\n\nkubectl get deployment my-app -o yaml > deployment-backup.yaml\n\n\nCheck before you delete:\n\nkubectl delete pod POD_NAME --dry-run=client\n\nGetting Help\nkubectl help                      # General help\nkubectl COMMAND --help            # Command help\nkubectl explain pods              # Resource documentation\nkubectl explain pods.spec         # Field documentation\n\nEnvironment Variables\nKUBECONFIG — Path to kubeconfig file (can include multiple paths separated by :)\nKUBECTL_CONTEXT — Override default context\nResources\nOfficial kubectl Docs\nkubectl Cheat Sheet\nKubernetes API Reference\nAgent Skills Specification\n\nVersion: 1.0.0\nLicense: MIT\nCompatible with: kubectl v1.20+, Kubernetes v1.20+"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ddevaal/kubectl",
    "publisherUrl": "https://clawhub.ai/ddevaal/kubectl",
    "owner": "ddevaal",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/kubectl",
    "downloadUrl": "https://openagent3.xyz/downloads/kubectl",
    "agentUrl": "https://openagent3.xyz/skills/kubectl/agent",
    "manifestUrl": "https://openagent3.xyz/skills/kubectl/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/kubectl/agent.md"
  }
}