Use when writing or editing Kubernetes manifests in a GitOps repository. Triggers on `.yaml` files in `clusters/`, `apps/`, or manifest directories, Deployments, Services, ConfigMaps, SOPS-encrypted Secrets, Kustomize overlays, Flux, ArgoCD, or per-environment config, even when the user doesn't say 'Kubernetes'.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Using Kubernetes?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/xonovex-using-kubernetes)
---
name: using-kubernetes
description: "Use when writing or editing Kubernetes manifests in a GitOps repository. Triggers on `.yaml` files in `clusters/`, `apps/`, or manifest directories, Deployments, Services, ConfigMaps, SOPS-encrypted Secrets, Kustomize overlays, Flux, ArgoCD, or per-environment config, even when the user doesn't say 'Kubernetes'."
---
# Kubernetes Coding Guidelines
Manage Kubernetes workloads through declarative manifests with explicit resource, rollout, and security settings.
## Requirements
- Kubernetes ≥ 1.28, Kustomize ≥ 5, GitOps (Flux).
## Essentials
- **Organization** - Use namespaces, labels, annotations consistently, see [references/deployments.md](references/deployments.md)
- **Container images** - Set requests/limits and probes, see [references/deployments.md](references/deployments.md)
- **Configuration** - Use ConfigMaps/Secrets, SOPS/External Secrets for secrets, see [references/configmaps-secrets.md](references/configmaps-secrets.md)
- **Multi-environment** - Manage with Kustomize bases/overlays, validate with `--dry-run`, see [references/kustomize.md](references/kustomize.md), [references/validation.md](references/validation.md)
## Gotchas
- `Secrets` are base64-encoded, not encrypted: encryption-at-rest requires enabling KMS provider on the cluster
- `resources.requests` is what the scheduler considers; `.limits` is what the kubelet enforces, without requests, pods compete unbounded
- Label selectors are immutable once a Service/Deployment is created: changing them requires recreate, not patch
- Namespace scope: `kubectl` defaults to `default` namespace; cross-namespace traffic needs `<svc>.<ns>.svc.cluster.local` or `NetworkPolicy`
- `Deployment` rolling updates require `readinessProbe` to be honest: a probe that returns 200 too early routes traffic to a not-ready pod
## Progressive disclosure
- Read [references/deployments.md](references/deployments.md) - Load when creating or updating Deployment resources
- Read [references/services.md](references/services.md) - Load when exposing applications or configuring load balancing
- Read [references/configmaps-secrets.md](references/configmaps-secrets.md) - Load when externalizing configuration or managing secrets
- Read [references/kustomize.md](references/kustomize.md) - Load when managing multiple environments with overlays
- Read [references/network-policies.md](references/network-policies.md) - Load when implementing network isolation between pods
- Read [references/validation.md](references/validation.md) - Load when validating manifests before applying to cluster