agentleFS
fmindfmind/dot/skills/kubernetes/SKILL.md

kubernetes

Skill10 starsChanged 56 days agoMITView on GitHub

Operate Kubernetes with kubectl, Helm, k9s, kustomize, and stern.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use terraform.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ihiteshguptaSkill

    terraform

    Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use kubectl, helm, k9s, kustomize, and stern for Kubernetes cluster inspection, manifest authoring, Helm releases, and log debugging.

    line 15
  2. Distinctive:

    Use a local cluster only when needed: read k3d before creating or deleting one.

    line 36
  3. Very specific:

    Keep Secret payloads out of logs: avoid running unbounded kubectl get secret -o yaml.

    line 57

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kubernetes Cluster and Workload Operations

Use kubectl, helm, k9s, kustomize, and stern for Kubernetes cluster inspection, manifest authoring, Helm releases, and log debugging. docker manages container runtimes and infra-as-code provisions managed cloud clusters.

Confirm user authority for cluster mutations and spending, reusing existing authorization. Pin --context and --namespace (or Helm's --kube-context) after resolving the intended cluster.

Workflow

  1. Verify active context and namespace: inspect the current cluster context before running any command; never assume terminal defaults point to dev.

    kubectl config get-contexts
    kubectl --context <context> cluster-info
  2. Lint and validate manifests: validate schemas against the target cluster's version (kubeconform defaults to master schemas) and verify security practices prior to applying manifests.

    kubeconform -strict -summary -kubernetes-version <cluster-version> <file-or-directory>
    trivy config <file-or-directory>
    kustomize build <kustomization-dir> | kubeconform -strict -summary -kubernetes-version <cluster-version> -
  3. Use a local cluster only when needed: read k3d before creating or deleting one; manifest checks often answer the question without it.
  4. Deploy declaratively: apply configurations using Helm or Kustomize; preview changes before mutating cluster state.

    helm upgrade --install <release-name> <chart-path> --kube-context <context> --namespace <namespace> --dry-run=server --hide-secret
    kubectl --context <context> --namespace <namespace> diff -k <kustomization-dir>

    A diff exit status of 1 means differences; higher values are errors. Review the preview, then apply within the authorized scope. kubectl diff masks Secret data unless --show-secrets is passed, but ConfigMaps and rendered chart values are not masked; exclude sensitive values from captured output.

  5. Inspect workloads and bounded logs: narrow to the relevant workload and time window. Use finite log reads for agents; reserve k9s and streaming stern for an explicitly interactive investigation. The line limit applies per pod/container, so keep the pod query narrow.

    stern <pod-query> --context <context> -n <namespace> --since 15m --tail 50 --no-follow
    kubectl --context <context> get pods,events -n <namespace>

Gotchas

  • Pin the context explicitly: omitted context flags use mutable kubeconfig defaults. Pass the selected context on each call; change the persistent current context only when that change is requested.
  • Keep Secret payloads out of logs: avoid running unbounded kubectl get secret -o yaml; inspect metadata and annotate keys without printing raw base64 payloads to terminal logs.

Task guides

<!-- guides:start -->
  • k3d: Create, budget, and tear down disposable local k3d clusters for runtime tests.
<!-- guides:end -->

Documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.