Skip to content
Skillv1.0.0

kubernetes-deployment-patterns

Kubernetes deployment strategies and workload patterns for production-grade applications. Use when deploying to Kubernetes, implementing rollout strategies, or designing cloud-native application archi

by nickcrew(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from nickcrew/claude-cortex (skills/kubernetes-deployment-patterns/SKILL.md). Install upstream with npx skills add nickcrew/claude-cortex --skill kubernetes-deployment-patterns. Copyright stays with the author.

Kubernetes Deployment Patterns

Expert guidance for production-grade Kubernetes deployments covering deployment strategies, workload types, configuration management, resource optimization, and autoscaling patterns for cloud-native applications.

When to Use This Skill

  • Implementing deployment strategies (rolling updates, blue-green, canary releases)
  • Choosing appropriate workload types (Deployment, StatefulSet, DaemonSet, Job)
  • Designing rollout strategies for zero-downtime deployments
  • Implementing configuration management with ConfigMaps and Secrets
  • Setting up resource management and autoscaling (HPA, VPA)
  • Configuring health checks and probe strategies
  • Designing highly available applications on Kubernetes
  • Implementing batch processing and scheduled jobs

Core Concepts

Deployment Strategies

Rolling Update: Gradually replace old pods with new ones (zero-downtime, default) Recreate: Terminate all old pods before creating new ones (brief downtime) Blue-Green: Run two environments, switch traffic instantly (2x resources) Canary: Gradually shift traffic to new version while monitoring (risk mitigation)

Workload Types

Deployment: Stateless applications (web servers, APIs, microservices) StatefulSet: Stateful applications (databases, message queues) DaemonSet: Node-level services (log collectors, monitoring agents) Job: One-time tasks (batch processing, migrations) CronJob: Scheduled tasks (backups, periodic reports)

Resource Management

Requests: Guaranteed resources for scheduling Limits: Maximum resources enforced by kubelet HPA: Horizontal Pod Autoscaler (scale replicas based on metrics) VPA: Vertical Pod Autoscaler (adjust resource requests/limits)

Quick Reference

Task Load reference
Deployment strategies (rolling, blue-green, canary) skills/kubernetes-deployment-patterns/references/deployment-strategies.md
Workload types (Deployment, StatefulSet, DaemonSet, Job) skills/kubernetes-deployment-patterns/references/workload-types.md
Configuration management (ConfigMaps, Secrets) skills/kubernetes-deployment-patterns/references/configuration-management.md
Resource management and autoscaling (HPA, VPA) skills/kubernetes-deployment-patterns/references/resource-management.md
Production best practices and security skills/kubernetes-deployment-patterns/references/production-best-practices.md

Workflow

1. Choose Deployment Strategy

# Rolling update for standard deployments
strategy:
  type: RollingUpdate
  rollingUpdate:
    maxSurge: 1
    maxUnavailable: 0

# Recreate for incompatible versions
strategy:
  type: Recreate

2. Select Workload Type

  • Stateless? → Use Deployment
  • Stateful with persistent identity? → Use StatefulSet
  • One pod per node? → Use DaemonSet
  • Run to completion? → Use Job
  • Run on schedule? → Use CronJob

3. Configure Resources

resources:
  requests:
    memory: "256Mi"
    cpu: "250m"
  limits:
    memory: "512Mi"
    cpu: "1000m"

4. Add Configuration

# ConfigMap for non-sensitive config
envFrom:
- configMapRef:
    name: app-config

# Secret for sensitive data
env:
- name: DB_PASSWORD
  valueFrom:
    secretKeyRef:
      name: db-credentials
      key: password

5. Implement Health Checks

livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 30
  periodSeconds: 10

readinessProbe:
  httpGet:
    path: /ready
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 5

6. Enable Autoscaling

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
spec:
  scaleTargetRef:
    kind: Deployment
    name: app
  minReplicas: 2
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70

Common Mistakes

  1. Using latest tag: Always use specific version tags for reproducibility
  2. No resource limits: Can cause resource starvation and cluster instability
  3. Missing health checks: Kubernetes can't manage pod health without probes
  4. Single replica in production: No high availability or resilience
  5. Secrets in ConfigMaps: Use Secrets for sensitive data, not ConfigMaps
  6. No update strategy: Leads to unpredictable deployment behavior
  7. Running as root: Security vulnerability, violates least privilege
  8. No monitoring: Can't detect or debug issues in production

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/nickcrew-claude-cortex-kubernetes-deployment-patterns/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

nickcrew-claude-cortex-kubernetes-deployment-patterns.ocm.jsonjson
{
  "ocm": "1",
  "id": "nickcrew-claude-cortex-kubernetes-deployment-patterns",
  "kind": "skill",
  "name": "kubernetes-deployment-patterns",
  "description": "Kubernetes deployment strategies and workload patterns for production-grade applications. Use when deploying to Kubernetes, implementing rollout strategies, or designing cloud-native application architectures.",
  "publisher": "nickcrew",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "daemonset",
      "statefulset",
      "blue-green-deployment",
      "canary-deployment",
      "deployment-strategy",
      "helm",
      "k8s",
      "kubernetes",
      "pod"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Kubernetes deployment strategies and workload patterns for production-grade applications. Use when deploying to Kubernetes, implementing rollout strategies, or designing cloud-native application architectures."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/nickcrew/claude-cortex",
      "path": "skills/kubernetes-deployment-patterns/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/nickcrew/claude-cortex/blob/HEAD/skills/kubernetes-deployment-patterns/SKILL.md",
      "key": "nickcrew/claude-cortex/skills/kubernetes-deployment-patterns/SKILL.md"
    }
  },
  "instructions": "# Kubernetes Deployment Patterns\n\nExpert guidance for production-grade Kubernetes deployments covering deployment strategies, workload types, configuration management, resource optimization, and autoscaling patterns for cloud-native applications.\n\n## When to Use This Skill\n\n- Implementing deployment strategies (rolling updates, blue-green, canary releases)\n- Choosing appropriate workload types (Deployment, StatefulSet, DaemonSet, Job)\n- Designing rollout strategies for zero-downtime deployments\n- Implementing configuration management with ConfigMaps and Secrets\n- Setting up resource management",
  "cost": {
    "context_tokens": 1271
  }
}

Fetch it by URL: GET /api/v1/registry/nickcrew-claude-cortex-kubernetes-deployment-patterns/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.