kubectl

Provide kubectl command references for Kubernetes cluster and resource management.

1.9k|133|Updated Apr 20, 2020
One-click install
npx skills add https://github.com/carapace-sh/carapace-bin --skill kubectl-carapace-sh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kubectl
Source: https://github.com/carapace-sh/carapace-bin/tree/main/skills/kubectl
Command: npx skills add https://github.com/carapace-sh/carapace-bin --skill kubectl-carapace-sh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on using the kubectl command-line tool for Kubernetes, addressing common challenges related to Kubernetes cluster management and resource manipulation.

Core Features & Use Cases

  • Command Structure: Detailed reference of kubectl commands and subcommands for different resource types.
  • Resource Types: Information on various Kubernetes resources like Pods, Deployments, Services, etc.
  • Workload Management: Instructions for managing workloads such as deployments, rollouts, scaling, and autoscaling.
  • Debugging: Guide on debugging Kubernetes workloads with logs, exec, port-forward, and top commands.
  • Cluster Management: Commands for cluster management like cordon, drain, taint, and cluster-info.
  • Output Formats: Options for customizing output formats using jsonpath, go-template, and custom-columns.
  • Use Case: If you need to understand how to perform a specific kubectl command or manage a particular resource in Kubernetes, this Skill provides detailed instructions and examples.

Quick Start

Use the kubectl skill to get information about a specific resource, such as a pod or a deployment.

Frequently Asked Questions about kubectl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Kubernetes workloads like deployments and rollouts using kubectl?

Kubernetes workload management involves using kubectl commands for deployments, rollouts, scaling, and autoscaling. This Skill provides detailed instructions and examples to manipulate these resources effectively.

What is the best way to debug a Kubernetes pod when logs are not enough?

Debugging Kubernetes workloads with kubectl involves using logs, exec, port-forward, and top commands. This allows direct interaction with pods to inspect resource consumption and troubleshoot issues effectively.

How do I format kubectl output to extract specific resource fields?

You can customize kubectl output formats using jsonpath, go-template, and custom-columns options. This Skill explains how to format output to extract specific fields from Kubernetes resources for scripting and automation.

Can I use kubectl to safely drain nodes for cluster maintenance?

Yes, kubectl includes cluster management commands like cordon, drain, and taint. You can safely mark nodes as unschedulable and evict workloads for maintenance while ensuring cluster stability.

Do I need to understand Kubernetes resources before using kubectl commands?

Yes, using kubectl commands requires existing knowledge of Kubernetes concepts and resources. This Skill focuses on providing in-depth command-line instructions for manipulating Pods, Deployments, and Services rather than teaching foundational architecture.