Back to Skills

creating-kubernetes-deployments

jeremylongshore
Updated Today
32 views
712
74
712
View on GitHub
Metageneral

About

This Claude Skill generates production-ready Kubernetes deployment manifests and services when triggered by phrases like "create kubernetes deployment" or "generate k8s manifest". It creates comprehensive YAML configurations including health checks, auto-scaling, resource limits, and ingress with TLS termination. Developers should use it when they need to quickly generate standardized Kubernetes deployment files for their applications.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus
Git CloneAlternative
git clone https://github.com/jeremylongshore/claude-code-plugins-plus.git ~/.claude/skills/creating-kubernetes-deployments

Copy and paste this command in Claude Code to install this skill

Documentation

Prerequisites

Before using this skill, ensure:

  • Kubernetes cluster is accessible and kubectl is configured
  • Container image is built and pushed to registry
  • Understanding of application resource requirements
  • Namespace exists or will be created
  • Ingress controller is installed (if using ingress)
  • TLS certificates are available (if using HTTPS)

Instructions

  1. Gather Requirements: Application name, image, replicas, ports, environment
  2. Create Deployment: Generate YAML with container spec and resource limits
  3. Add Health Checks: Configure liveness and readiness probes
  4. Define Service: Create ClusterIP, NodePort, or LoadBalancer service
  5. Configure Ingress: Set up routing rules and TLS termination
  6. Add ConfigMaps/Secrets: Externalize configuration and sensitive data
  7. Enable Auto-scaling: Create HorizontalPodAutoscaler if needed
  8. Apply Manifests: Use kubectl apply to deploy resources

Output

Deployment Manifest:

# {baseDir}/k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-web-app
  namespace: production
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-web-app
  template:
    metadata:
      labels:
        app: my-web-app
    spec:
      containers:
      - name: app
        image: registry/my-web-app:v1.0.0
        ports:
        - containerPort: 80
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 512Mi
        livenessProbe:
          httpGet:
            path: /health
            port: 80
          initialDelaySeconds: 30
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /ready
            port: 80
          initialDelaySeconds: 5
          periodSeconds: 5

Service and Ingress:

# {baseDir}/k8s/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: my-web-app
  namespace: production
spec:
  type: ClusterIP
  selector:
    app: my-web-app
  ports:
  - port: 80
    targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-web-app
  namespace: production
spec:
  tls:
  - hosts:
    - app.example.com
    secretName: tls-cert
  rules:
  - host: app.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: my-web-app
            port:
              number: 80

Error Handling

Image Pull Error

  • Error: "ErrImagePull" or "ImagePullBackOff"
  • Solution: Verify image name, tag, and registry credentials in imagePullSecrets

CrashLoopBackOff

  • Error: Pod repeatedly crashes and restarts
  • Solution: Check application logs with kubectl logs and review container health

Resource Quota Exceeded

  • Error: "forbidden: exceeded quota"
  • Solution: Reduce resource requests or increase namespace quota

Ingress Not Working

  • Error: 404 or 503 on ingress domain
  • Solution: Verify ingress controller is running and service endpoints are ready

TLS Certificate Error

  • Error: "certificate signed by unknown authority"
  • Solution: Create or update TLS secret with valid certificate

Resources

GitHub Repository

jeremylongshore/claude-code-plugins-plus
Path: plugins/devops/kubernetes-deployment-creator/skills/kubernetes-deployment-creator
aiautomationclaude-codedevopsmarketplacemcp

Related Skills

subagent-driven-development

Development

This skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.

View skill

algorithmic-art

Meta

This Claude Skill creates original algorithmic art using p5.js with seeded randomness and interactive parameters. It generates .md files for algorithmic philosophies, plus .html and .js files for interactive generative art implementations. Use it when developers need to create flow fields, particle systems, or other computational art while avoiding copyright issues.

View skill

executing-plans

Design

Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.

View skill

cost-optimization

Other

This Claude Skill helps developers optimize cloud costs through resource rightsizing, tagging strategies, and spending analysis. It provides a framework for reducing cloud expenses and implementing cost governance across AWS, Azure, and GCP. Use it when you need to analyze infrastructure costs, right-size resources, or meet budget constraints.

View skill