mcpField
K
k8s

k8s

github.com/ionfuryCloud & DevOps2549 installsUpdated today
Repository

About k8s

k8s is an operational skill for accessing and troubleshooting Kubernetes clusters, aimed at people handling routine cluster maintenance. It provides common kubectl and Flux checks, explains Flux states, and outlines a way to research unfamiliar service documentation.

Key features

  1. 01Access guidance for dev, integration, and live
  2. 02kubectl checks for resources, logs, and events
  3. 03Flux status checks and reconciliation commands
  4. 04Flux state meanings and suggested actions
  5. 05Research workflow for unfamiliar services

Use cases

  1. 01Check pod status, logs, and resource usage
  2. 02Diagnose issues with Flux-managed deployments
  3. 03Find failure modes and health indicators for an unfamiliar service

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ionfury/homelab --skill k8s

After installing, type/k8sin Claude Code to confirm it loaded.

Bundled filesservices.mdtests.yaml

Details

From the project README

ACCESSING CLUSTERS

The available clusters are dev, integration, and live. Use the coresponding kube context for access.

Common kubectl Patterns

CommandPurpose
kubectl get pods -n <ns>List pods in a namespace
kubectl get pods -AList pods across all namespaces
kubectl describe pod <pod> -n <ns>Detailed pod info with events
kubectl logs <pod> -n <ns> --tail=100Recent logs from a pod
kubectl logs <pod> -n <ns> --previousLogs from previous container instance
kubectl get events -n <ns> --sort-by='.lastTimestamp'Recent events timeline
kubectl top pods -n <ns>CPU/memory usage per pod
kubectl top nodesCPU/memory usage per node
kubectl get ns <ns> --show-labelsNamespace labels (network policy profiles)
kubectl explain <resource>API schema reference for a resource type

Flux GitOps Commands

# Check status
flux --context <cluster> get all
flux --context <cluster> get kustomizations
flux --context <cluster> get helmreleases -A

# Trigger reconciliation
flux --context <cluster> reconcile source git flux-system
flux --context <cluster> reconcile kustomization <name>
flux --context <cluster> reconcile helmrelease <name> -n <namespace>

Flux Status Interpretation

StatusMeaningAction
Ready: TrueReconciled and healthyNone
Ready: FalseFailed to reconcileCheck the message/reason
Stalled: TrueStopped retrying after repeated failuresSuspend/resume to reset (see sre skill)
Suspended: TrueIntentionally pausedResume: flux resume <type> <name>
ReconcilingActively being appliedWait for completion

Researching Unfamiliar Services

When investigating unknown services, spawn a haiku agent to research documentation:

Task tool:
- subagent_type: "general-purpose"
- model: "haiku"
- prompt: "Research [service] troubleshooting docs. Focus on:
  1. Common failure modes
  2. Health indicators
  3. Configuration gotchas
  Start with: [docs-url]"

Chart URL to Docs mapping:

Chart SourceDocumentation
charts.jetstack.iocert-manager.io/docs
charts.longhorn.iolonghorn.io/docs
grafana.github.iografana.com/docs
prometheus-community.github.ioprometheus.io/docs

Common Confusions

BAD: Use helm list to check Helm release status GOOD: Use kubectl get helmrelease -A — Flux manages releases via CRDs, not Helm CLI

Comments

Markdown supported