kubernetes-operators
Kubernetes infrastructure patterns including operators, Helm, GitOps, and component provisioning.
Best use case
kubernetes-operators is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Kubernetes infrastructure patterns including operators, Helm, GitOps, and component provisioning.
Teams using kubernetes-operators should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/kubernetes-operators/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How kubernetes-operators Compares
| Feature / Agent | kubernetes-operators | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Kubernetes infrastructure patterns including operators, Helm, GitOps, and component provisioning.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Kubernetes Infrastructure Patterns
Infrastructure provisioning using Kubernetes operators, Helm, and GitOps practices.
## Core Stack
| Component | Tool | Purpose |
|-----------|------|---------|
| Container | Docker | Image building |
| Orchestration | Kubernetes | Workload management |
| Package Manager | Helm | Chart management |
| GitOps | ArgoCD, Kustomize | Declarative deployments |
| CI/CD | GitHub Actions, Argo Workflows | Automation |
| Monitoring | Prometheus, Grafana, Loki | Observability |
| Networking | Ingress, NetworkPolicies | Traffic management |
## Context7 Library IDs
Query these for current best practices:
- **ArgoCD**: `/argoproj/argo-cd`
- **Helm**: `/helm/helm`
## Execution Rules
1. **GitOps first.** All changes through git, not `kubectl apply` ad-hoc
2. **Helm best practices.** Values.yaml for configuration, templates for logic
3. **Security.** No secrets in code, use External Secrets Operator
4. **Idempotent.** All operations safe to retry
5. **Validate.** Always `helm template` and `kubectl diff` before apply
## Available Operators
| Type | Operator | CRD Kind | Namespace |
|------|----------|----------|-----------|
| PostgreSQL | CloudNative-PG | `Cluster` | databases |
| Redis/Valkey | Redis Operator | `Redis` | databases |
| S3/Storage | SeaweedFS | Helm | seaweedfs |
| Kafka | Strimzi | `Kafka` | kafka |
| MongoDB | Percona | `PerconaServerMongoDB` | databases |
| MySQL | Percona | `PerconaXtraDBCluster` | databases |
| NATS | NATS Helm | Helm | nats |
| RabbitMQ | RabbitMQ Operator | `RabbitmqCluster` | messaging |
## Size Presets
| Size | CPU Request | Memory | Storage | Replicas |
|------|-------------|--------|---------|----------|
| small | 100m | 256Mi | 5Gi | 1 |
| medium | 500m | 1Gi | 20Gi | 1-2 |
| large | 1000m | 4Gi | 100Gi | 3 |
## Infrastructure Provisioning Process
### Step 1: Parse Requirements
Extract infrastructure from task XML:
```xml
<infrastructure>
<component type="postgresql" name="app-db">
<size>small</size>
<replicas>1</replicas>
<database>app_production</database>
</component>
</infrastructure>
```
### Step 2: Generate Manifests
Create manifests in the `infra/` directory:
```
infra/
├── postgresql/
│ └── cluster.yaml
├── valkey/
│ └── redis.yaml
├── seaweedfs/
│ └── bucket-init.yaml
└── kustomization.yaml
```
### Step 3: PostgreSQL Example
```yaml
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: app-db
namespace: databases
spec:
instances: 1
storage:
size: 5Gi
storageClass: mayastor
bootstrap:
initdb:
database: app_production
owner: app_user
```
### Step 4: Valkey/Redis Example
```yaml
apiVersion: redis.redis.opstreelabs.in/v1beta2
kind: Redis
metadata:
name: app-cache
namespace: databases
spec:
kubernetesConfig:
image: redis:7-alpine
storage:
volumeClaimTemplate:
spec:
storageClassName: mayastor
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
```
### Step 5: Apply and Wait
```bash
# Apply manifests
kubectl apply -k infra/
# Wait for PostgreSQL
kubectl wait --for=condition=Ready cluster/app-db -n databases --timeout=300s
# Wait for Valkey
kubectl wait --for=condition=Ready redis/app-cache -n databases --timeout=300s
```
### Step 6: Create Infrastructure ConfigMap
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-infra-config
namespace: app
labels:
cto.platform/type: infrastructure-config
data:
DATABASE_URL: postgresql://app_user:$DB_PASSWORD@app-db-rw.databases.svc:5432/app
DATABASE_HOST: app-db-rw.databases.svc
DATABASE_PORT: "5432"
DATABASE_NAME: app
REDIS_URL: redis://app-cache.databases.svc:6379
REDIS_HOST: app-cache.databases.svc
REDIS_PORT: "6379"
S3_ENDPOINT: http://seaweedfs-filer.seaweedfs.svc:8333
S3_BUCKET: app-uploads
```
## Validation Commands
```bash
# Helm validation
helm lint ./chart
helm template ./chart --debug
# Kubernetes validation
kubectl diff -f manifest.yaml
kubeval manifest.yaml
# ArgoCD
argocd app diff app-name
# Check status
kubectl get all -n databases
kubectl get cluster -n databases -o wide
kubectl get redis -n databases
```
## Error Handling
If provisioning fails:
1. Check operator logs: `kubectl logs -n operators -l app.kubernetes.io/name=<operator>`
2. Describe the resource: `kubectl describe cluster/app-db -n databases`
3. Check events: `kubectl get events -n databases --sort-by='.lastTimestamp'`
4. Verify storage class: `kubectl get storageclass mayastor`
## Guidelines
- Use operators for stateful services (databases, caches)
- Store connection details in ConfigMaps for other agents
- Always wait for resources to be ready before completing
- Document connection information in infra/README.md
- Use GitOps (ArgoCD) for production deployments
- Never hardcode secrets in manifestsRelated Skills
opentofu-kubernetes-explorer
Explore and manage Kubernetes clusters and resources using OpenTofu/Terraform
learn-kubernetes-space-station-intermediate
Interactive narrative learning session that teaches Kubernetes through a Space Station adventure at intermediate level. Use this session when you want to learn Kubernetes through immersive story-driven chapters, hands-on exercises, and tasks grounded in real, up-to-date documentation.
kubernetes-troubleshooting
Debug Kubernetes pods, services, networking, and scaling issues. Use this skill when troubleshooting K8s deployments, investigating pod failures, or diagnosing cluster problems.
kubernetes-orchestration
Kubernetes container orchestration. Use when deploying to Kubernetes, writing manifests, configuring Helm charts, or troubleshooting cluster issues.
kubernetes-ops
Kubernetes cluster operations: kubectl commands, manifest generation, Helm charts, RBAC, debugging, and deployment strategies.
kubernetes-deployment
Deploy, manage, and scale applications on Kubernetes clusters using manifests, Helm charts, and autoscaling configurations.
kubernetes-deployer
Package and deploy applications to Kubernetes with Dockerfiles, Helm charts, and local Minikube deployment. Use when containerizing applications, creating Kubernetes manifests, setting up Helm charts, deploying to Minikube, or preparing cloud-ready configurations. Focuses on local-first deployment with stateless services.
kubernetes-architect
Expert Kubernetes architect specializing in cloud-native infrastructure, advanced GitOps workflows (ArgoCD/Flux), and enterprise container orchestration.
Kind Local Kubernetes
This skill should be used when the user asks to "setup Kind", "local Kubernetes", "Kind cluster", "multi-node cluster", "Kubernetes development", "k8s local environment", or works with local Kubernetes clusters using Kind.
featbit-deployment-kubernetes
Deploys FeatBit to Kubernetes using Helm Charts. Use when user mentions "Kubernetes", "Helm", "K8s", "kubectl", works with values.yaml files, asks about "cloud deployment", "AKS", "EKS", "GKE", "ingress", or needs production-grade container orchestration setup.
FastAPI Kubernetes Deployment
This skill should be used when the user asks to "deploy FastAPI to Kubernetes", "create Dockerfile", "build Docker image", "write Helm chart", "configure K8s deployment", "add health checks", "scale FastAPI", or mentions Docker, Kubernetes, K8s, containers, Helm, or deployment. Provides containerization and orchestration patterns.
Docker & Kubernetes
Containerization, orchestration, and deployment with Docker and K8s