skills/devops/kubernetes/SKILL.md
Use when writing Kubernetes manifests for .NET microservice deployment.
npx skillsauth add faysilalshareef/dotnet-ai-kit kubernetesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
dev-manifest.yaml, staging-manifest.yaml, prod-manifest.yaml#{TOKEN}#) replaced during CI/CD deployment/health/ready (readiness), /health/live (liveness)maxUnavailable: 0, maxSurge: 1apiVersion: apps/v1
kind: Deployment
metadata:
name: {domain}-command
namespace: {company}-{env}
spec:
replicas: #{REPLICAS}#
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app: {domain}-command
template:
metadata:
labels:
app: {domain}-command
spec:
containers:
- name: {domain}-command
image: #{ACR_NAME}#.azurecr.io/{domain}-command:#{IMAGE_TAG}#
ports:
- containerPort: 8080
- containerPort: 8081
env:
- name: ASPNETCORE_ENVIRONMENT
value: "#{ENVIRONMENT}#"
- name: ConnectionStrings__DefaultConnection
valueFrom:
secretKeyRef:
name: {domain}-secrets
key: db-connection-string
- name: ServiceBus__ConnectionString
valueFrom:
secretKeyRef:
name: {domain}-secrets
key: servicebus-connection
- name: ExternalServices__QueryServiceUrl
value: "http://{domain}-query:8081"
readinessProbe:
httpGet:
path: /health/ready
port: 8080
initialDelaySeconds: 10
periodSeconds: 15
livenessProbe:
httpGet:
path: /health/live
port: 8080
initialDelaySeconds: 30
periodSeconds: 30
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
apiVersion: v1
kind: Service
metadata:
name: {domain}-command
namespace: {company}-{env}
spec:
selector:
app: {domain}-command
ports:
- name: http
port: 8080
targetPort: 8080
- name: grpc
port: 8081
targetPort: 8081
type: ClusterIP
apiVersion: v1
kind: Secret
metadata:
name: {domain}-secrets
namespace: {company}-{env}
type: Opaque
stringData:
db-connection-string: "#{DB_CONNECTION_STRING}#"
servicebus-connection: "#{SERVICEBUS_CONNECTION}#"
apiVersion: v1
kind: ConfigMap
metadata:
name: {domain}-config
namespace: {company}-{env}
data:
Serilog__SeqUrl: "http://seq:5341"
Serilog__WriteToConsole: "true"
| Anti-Pattern | Correct Approach | |---|---| | Secrets in ConfigMap | Use Secret for sensitive data | | No resource limits | Set requests and limits for stability | | Missing health probes | Add readiness and liveness probes | | Hardcoded image tags | Use token placeholders for CI/CD | | maxUnavailable > 0 | Zero downtime: maxUnavailable=0, maxSurge=1 |
# Find K8s manifests
find . -name "*-manifest.yaml" -o -name "*.k8s.yaml" | head -10
# Find token placeholders
grep -r "#{.*}#" --include="*.yaml" .
# Find health check endpoints
grep -r "/health" --include="*.cs" src/
{env}-manifest.yaml{company}-{env}data-ai
Use when about to claim work is complete, fixed, passing, or ready — before committing, creating PRs, or moving to the next task. Requires running verification commands and confirming output before making any success claims.
development
Use when encountering any bug, test failure, build error, or unexpected behavior — before proposing fixes or making changes.
development
Use when checkpointing, wrapping up, or handing off an AI-assisted development session.
development
Use when following the Specification-Driven Development lifecycle from plan through ship.