
Kubernetes Deployment
Generate and refine production-grade Kubernetes Deployment manifests with rolling updates, replicas, health checks, and namespace-aware ops for solo-run services.
Overview
Kubernetes Deployment is an agent skill most often used in Operate (also Ship) that deploys and scales containerized apps on Kubernetes with rolling updates, health checks, and production workload best practices.
Install
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill kubernetes-deploymentWhat is this skill?
- Production Deployment YAML with replicas, labels, and RollingUpdate (maxSurge / maxUnavailable)
- Multi-environment patterns (dev, staging, prod) and namespace organization
- Health checks, service discovery, load balancing, and resource quotas
- Rolling, blue-green, and auto-scaling oriented guidance
- Table of contents structure: overview, when to use, quick start, reference guides, best practices
- Quick-start example uses 3 replicas with RollingUpdate maxSurge 1 and maxUnavailable 0
Adoption & trust: 590 installs on skills.sh; 250 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have images ready to run but no consistent Kubernetes manifests or rollout strategy for dev, staging, and prod.
Who is it for?
Indie backends and APIs already containerized who self-host or use managed Kubernetes and want agent-guided manifests instead of copy-paste snippets.
Skip if: Pure serverless or static-only hosting with no cluster, or teams that only need docker-compose on a single VM.
When should I use this skill?
Container orchestration and management, multi-environment deployments, auto-scaling microservices, rolling or blue-green updates, service discovery, resource quotas, pod networking and security policies
What do I get? / Deliverables
You get structured Deployment YAML and operational patterns for rolling updates, scaling, and cluster hygiene you can apply in your namespace.
- kubernetes-deployment.yaml (or equivalent manifests)
- Rolling update strategy configuration
- Environment/namespace layout notes
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Running containerized apps in prod is Operate work; K8s is where indie backends live after the first ship. infra is the canonical shelf because the skill centers on cluster deployments, resource limits, networking, and rolling strategies—not app feature code.
Where it fits
Finalize a three-replica Deployment and rollout strategy before pointing production traffic at the new image.
Adjust resource requests/limits and rolling update parameters after a noisy-neighbor incident on the cluster.
Align service labels and selectors with how the API will be exposed behind a ClusterIP or ingress later.
How it compares
Kubernetes-native deployment templates—not a generic PaaS deploy skill or local-only Docker Compose guide.
Common Questions / FAQ
Who is kubernetes-deployment for?
Solo and small-team builders operating containerized services on Kubernetes who want agent help for manifests, rollouts, and resource management.
When should I use kubernetes-deployment?
During Ship launch prep when hardening prod manifests; during Operate infra work for rollouts, scaling, quotas, and multi-environment cluster management.
Is kubernetes-deployment safe to install?
It is prompt guidance only; review the Security Audits panel on this page and never let an agent apply cluster changes without your reviewed kubeconfig and RBAC limits.
SKILL.md
READMESKILL.md - Kubernetes Deployment
# Kubernetes Deployment ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use) - [Quick Start](#quick-start) - [Reference Guides](#reference-guides) - [Best Practices](#best-practices) ## Overview Master Kubernetes deployments for managing containerized applications at scale, including multi-container services, resource allocation, health checks, and rolling deployment strategies. ## When to Use - Container orchestration and management - Multi-environment deployments (dev, staging, prod) - Auto-scaling microservices - Rolling updates and blue-green deployments - Service discovery and load balancing - Resource quota and limit management - Pod networking and security policies ## Quick Start Minimal working example: ```yaml # kubernetes-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: api-service namespace: production labels: app: api-service version: v1 spec: replicas: 3 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 selector: matchLabels: app: api-service template: metadata: labels: app: api-service version: v1 annotations: // ... (see reference guides for full implementation) ``` ## Reference Guides Detailed implementations in the `references/` directory: | Guide | Contents | |---|---| | [Complete Deployment with Resource Management](references/complete-deployment-with-resource-management.md) | Complete Deployment with Resource Management | | [Deployment Script](references/deployment-script.md) | Deployment Script | | [Service Account and RBAC](references/service-account-and-rbac.md) | Service Account and RBAC | ## Best Practices ### ✅ DO - Use resource requests and limits - Implement health checks (liveness, readiness) - Use ConfigMaps for configuration - Apply security context restrictions - Use service accounts and RBAC - Implement pod anti-affinity - Use namespaces for isolation - Enable pod security policies ### ❌ DON'T - Use latest image tags in production - Run containers as root - Set unlimited resource usage - Skip readiness probes - Deploy without resource limits - Mix configurations in container images - Use default service accounts # Complete Deployment with Resource Management ## Complete Deployment with Resource Management ```yaml # kubernetes-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: api-service namespace: production labels: app: api-service version: v1 spec: replicas: 3 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 selector: matchLabels: app: api-service template: metadata: labels: app: api-service version: v1 annotations: prometheus.io/scrape: "true" prometheus.io/port: "8080" spec: # Service account for RBAC serviceAccountName: api-service-sa # Security context securityContext: runAsNonRoot: true runAsUser: 1000 fsGroup: 1000 # Pod scheduling affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - api-service topologyKey: kubernetes.io/hostname # Pod termination grace period terminationGracePeriodSeconds: 30 # Init containers initContainers: - name: wait-for-db image: busybox:1.35 command: [ "sh", "-c",