Communitygithub.com

G1Joshi/Agent-Skills

Expert K9s CLI assistance covering terminal Kubernetes cluster navigation, real-time log streaming, port forwarding, and pod debugging. Use when managing and troubleshooting Kubernetes clusters with speed.

Was ist Agent-Skills?

Agent-Skills is a Claude Code agent skill that expert K9s CLI assistance covering terminal Kubernetes cluster navigation, real-time log streaming, port forwarding, and pod debugging. Use when managing and troubleshooting Kubernetes clusters with speed.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/G1Joshi/Agent-Skills/tree/HEAD/skills/tools/k9s

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

K9s

K9s is a terminal UI (TUI) for Kubernetes. It is faster than clicking in a web dashboard and morediscoverable than raw kubectl.

When to Use

  • Terminal-Based Kubernetes Cluster Management: Fast, interactive curses UI for navigating pods, services, and deployments.
  • Real-Time Log Streaming & Resource Monitoring: Tailing multi-pod logs, sorting by CPU/memory, and port forwarding.
  • Custom K9s Plugins & Aliases: Extending the CLI with custom shell commands (e.g. running stern, cert-manager status).
  • Read-Only Inspection & Troubleshooting: Safely debugging production clusters with read-only modes.

Quick Start

# Launch k9s with active kubeconfig
k9s

# Navigation shortcuts in k9s:
# :pods      - View all pods across namespaces
# :deploy    - View deployments
# :svc       - View services
# /<term>    - Filter items in active view
# l          - Stream logs for selected pod
# s          - Open shell (exec) inside selected container

Core Concepts

#Custom Plugins Configuration (plugins.yaml)

Adding custom keyboard commands for rapid debugging:

# ~/.config/k9s/plugins.yaml
plugin:
  # Press 'Shift-D' on a deployment to view detailed rollout history
  rollout-history:
    shortCut: Shift-D
    confirm: false
    description: "Rollout History"
    scopes:
      - deployments
    command: kubectl
    background: false
    args:
      - rollout
      - history
      - deployment/$NAME
      - -n
      - $NAMESPACE

  # Press 'Shift-F' on a pod to launch interactive debug container
  debug-pod:
    shortCut: Shift-F
    confirm: true
    description: "Debug Pod"
    scopes:
      - pods
    command: kubectl
    background: false
    args:
      - debug
      - -it
      - $NAME
      - --image=nicolaka/netshoot
      - -n
      - $NAMESPACE

#Essential Navigation & Keyboard Shortcuts

Accelerating cluster management:

  • :pod: Jump to Pod view across namespaces.
  • :svc, :deploy, :ing: Jump to Services, Deployments, and Ingresses.
  • /: Search and filter resources by name or status.
  • l: Tail logs for selected pod or container.
  • s: Open an interactive shell (sh / bash) inside the selected container.
  • Shift-F: Port-forward local port to selected pod service port.
  • y: View full YAML manifest of selected resource.

#Launching K9s with Custom Options

Starting K9s in secure modes:

# Launch in read-only mode to prevent accidental pod deletion in production
k9s --readonly --namespace production

# Specify custom context and refresh rate
k9s --context prod-eks-cluster --refresh 2

Common Patterns

#Custom K9s Shortcuts and Plugins Problem: Frequently running custom kubectl commands across different namespaces.
Solution: Define custom plugins in ~/.config/k9s/plugin.yaml.

# ~/.config/k9s/plugin.yaml
plugin:
  raw-logs:
    shortCut: Shift-L
    description: "Tail logs without truncation"
    scopes:
      - pods
    command: kubectl
    background: false
    args:
      - logs
      - -f
      - $NAME
      - -n
      - $NAMESPACE
      - --context
      - $CONTEXT

Best Practices (2026)

  • Do use k9s --readonly when connecting to production environments to prevent accidental deletions.
  • Do configure custom plugins in ~/.config/k9s/plugins.yaml for repetitive kubectl commands.
  • Do use the port-forward shortcut (Shift-F) instead of typing long kubectl port-forward commands.
  • Do filter views using <all> namespaces or specific namespaces to reduce API server query loads.
  • Don't leave dozens of active port forwards open; manage and terminate them in the :portforwards view.
  • Don't run K9s against large enterprise clusters without setting appropriate --refresh intervals.
  • Don't delete persistent volume claims (PVCs) through K9s without verifying backups.

Troubleshooting

ErrorCauseSolution
Boom!! K9s cannot connect to clusterActive kubeconfig context invalid or cluster endpoint unreachable.Verify connection: kubectl cluster-info and switch context with kubectl config use-context.
Pod logs failing to stream in k9sPod container crashed or user lacks RBAC pods/log permission.Check container status and verify cluster role permissions.
Terminal display corrupted / artifactsIncompatible terminal terminfo or small terminal window.Run export TERM=xterm-256color and maximize terminal window.

References

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

G1Joshi/Agent-Skills

Expert Dask distributed computing assistance covering Dask DataFrames, Arrays, Futures, and cluster scaling. Use when analyzing datasets too large for pandas on a single machine or multi-node cluster.

G1Joshi/Agent-Skills

Expert dbt (data build tool) assistance covering SQL modeling, Jinja macros, tests, documentation, and semantic layer. Use when building analytics engineering pipelines on BigQuery, Snowflake, or PostgreSQL.

G1Joshi/Agent-Skills

Expert JAX assistance covering Autograd, XLA compilation (`jit`), vectorization (`vmap`), and parallelization (`pmap`). Use when building high-performance numerical computing and cutting-edge deep learning research.

G1Joshi/Agent-Skills

Expert Ray distributed computing assistance covering Ray Core (actors, tasks), Ray Train, Ray Tune, and Ray Serve. Use when scaling Python compute and ML training across multi-node clusters.

G1Joshi/Agent-Skills

Expert Git version control assistance covering branching, interactive rebase, cherry-pick, submodules, worktrees, and conflict resolution. Use when managing source code history and collaboration workflows.

G1Joshi/Agent-Skills

Expert SWC assistance covering high-performance Rust-based JavaScript/TypeScript compilation, .swcrc configuration, Jest testing via @swc/jest, and minification. Use when replacing Babel with SWC for faster builds, accelerating test execution, or compiling modern ECMAScript features.

G1Joshi/Agent-Skills

Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.

G1Joshi/Agent-Skills

Expert Vim assistance covering modal editing, .vimrc configuration, registers, macros, search/replace, and plugin management via vim-plug. Use when editing text efficiently in terminal environments, writing Vimscript, recording macros, or configuring core Vim settings.

G1Joshi/Agent-Skills

Expert Zed editor assistance covering high-performance Rust-based text editing, multi-buffer editing, language server protocols (LSP), and AI assistant integrations. Use when configuring Zed settings.json, setting up language extensions, collaborating in real-time channels, or optimizing editor startup speed.

G1Joshi/Agent-Skills

Expert Zsh assistance covering shell customization, Oh My Zsh plugins, Zinit plugin manager, prompt engineering (Starship/Powerlevel10k), and shell scripting. Use when configuring .zshrc, writing Zsh automation scripts, optimizing shell startup time, or configuring tab-completion.

G1Joshi/Agent-Skills

Expert [skill-name] assistance covering [feature 1], [feature 2], and [feature 3]. Use when [working with X], [debugging Y], or [implementing Z].

Verwandte Skills