Agent skill

kubernetes-operations

Kubernetes cluster operations on minikube including observability (Grafana, Prometheus, Alertmanager, Loki, Tempo), debugging (kubectl debug, ephemeral containers), and cluster management (ArgoCD). Use when working with cluster/manifests/, Kubernetes workloads, pods, deployments, operators, controllers, or cluster components.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/kubernetes-operations-hippocampus-dev-hippocampus

Metadata

Additional technical details for this skill

short description
kubernetes, k8s, minikube, grafana, prometheus, loki, tempo, argocd, pod, クラスタ, 監視, kubectl, deployment

SKILL.md

  • Access Grafana at https://grafana.minikube.127.0.0.1.nip.io
  • Use EphemeralContainer for in-container debugging
  • Disable ArgoCD selfHeal before manual changes, re-enable after

Debugging with Ephemeral Container

bash
kubectl debug <pod-name> -n <namespace> \
  --profile=restricted \
  --image=ghcr.io/hippocampus-dev/hippocampus/ephemeral-container:main \
  --target=<container-name> \
  -- <command>

Note: Do not use -it flag when executing commands. It causes output streaming issues.

ArgoCD selfHeal Control

bash
# Disable selfHeal
kubectl patch application <app-name> -n argocd --type=merge \
  -p '{"spec":{"syncPolicy":{"selfHeal":false}}}'

# Re-enable selfHeal (after work is complete)
kubectl patch application <app-name> -n argocd --type=merge \
  -p '{"spec":{"syncPolicy":{"selfHeal":true}}}'

Observability Signal Overview

Signal Backend Query Language Use Case
Traces Tempo TraceQL Request flow, latency analysis
Metrics Mimir (Prometheus) PromQL Resource usage, alerting
Logs Loki LogQL Error investigation, audit
Profiles Pyroscope Flamegraph UI CPU/memory hotspots
Probes Blackbox Exporter PromQL Endpoint reachability

Debugging Workflow

  1. Get query parameters - Check cluster/manifests/<app>/ for namespace, labels, OTEL_SERVICE_NAME
  2. Check dashboard - Open Grafana (kubernetes/namespace, kubernetes/workload, kubernetes/pod)
  3. Query by symptom - Use appropriate signal based on issue type
Symptom Signal Action
Errors in logs Loki → Tempo Extract traceid, trace in Tempo
Latency/5xx Tempo Search traces with status = error
Resource saturation Mimir Query CPU/memory metrics
High CPU/memory Pyroscope Check flamegraphs
Pod not starting kubectl kubectl get events -n <namespace>

Observability Stack Manifests

Component Path
Grafana cluster/manifests/grafana/
Tempo cluster/manifests/tempo/
Mimir cluster/manifests/mimir/
Loki cluster/manifests/loki/
Pyroscope cluster/manifests/pyroscope/
Prometheus cluster/manifests/prometheus/
Fluentd cluster/manifests/fluentd/
OpenTelemetry cluster/manifests/otel-agent/, cluster/manifests/otel-collector/

Reference

If writing observability queries: See Queries

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results