Skip to content
cloud-k8s-deployment logo

Cloud Kubernetes Deployment Skill

cloud-k8s-deployment

Deploy to cloud Kubernetes clusters - DigitalOcean DOKS primary, with multi-cloud patterns for AWS EKS and GKE. Use when deploying Phase 5 to production cloud environments. (project)

SKILL.md

Full skill instructions

Cloud Kubernetes Deployment Skill

Quick Start

  1. Read Phase 5 Constitution - constitution-prompt-phase-5.md
  2. Choose cloud provider - DigitalOcean DOKS (primary)
  3. Create cluster - Using cloud CLI or Terraform
  4. Configure kubectl - Get credentials
  5. Install prerequisites - Ingress, cert-manager, Dapr
  6. Deploy with Helm - Using environment-specific values

Cloud Provider Comparison

FeatureDigitalOcean DOKSAWS EKSGoogle GKE
Cost$$ (Cheapest)$$$$$$$
EaseEasyComplexMedium
ManagedYesYesYes
Free TierNoneSomeSome
Best ForStartups, MVPEnterpriseML/​AI

DigitalOcean DOKS Setup (Primary)

Install doctl CLI

# macOS
brew install doctl

# Linux
cd ~ && curl -OL https://github.com/​digitalocean/​doctl/​releases/​download/​v1.104.0/​doctl-1.104.0-linux-amd64.tar.gz
tar xf ~/​doctl-1.104.0-linux-amd64.tar.gz
sudo mv ~/​doctl /​usr/​local/​bin

# Authenticate
doctl auth init

Create DOKS Cluster

# Create cluster
doctl kubernetes cluster create todo-production \
  --region nyc1 \
  --version 1.29.1-do.0 \
  --node-pool "name=default;size=s-2vcpu-4gb;count=3;auto-scale=true;min-nodes=2;max-nodes=5" \
  --wait

# Get kubeconfig
doctl kubernetes cluster kubeconfig save todo-production

# Verify
kubectl get nodes

Terraform Configuration

Create terraform/​digitalocean/​main.tf:

terraform {
  required_providers {
    digitalocean = {
      source  = "digitalocean/​digitalocean"
      version = "~> 2.0"
    }
  }
}

provider "digitalocean" {
  token = var.do_token
}

resource "digitalocean_kubernetes_cluster" "todo" {
  name    = "todo-production"
  region  = "nyc1"
  version = "1.29.1-do.0"

  node_pool {
    name       = "default"
    size       = "s-2vcpu-4gb"
    auto_scale = true
    min_nodes  = 2
    max_nodes  = 5
  }

  maintenance_policy {
    start_time = "04:00"
    day        = "sunday"
  }
}

resource "digitalocean_container_registry" "todo" {
  name                   = "todo-registry"
  subscription_tier_slug = "basic"
}

output "cluster_id" {
  value = digitalocean_kubernetes_cluster.todo.id
}

output "kubeconfig" {
  value     = digitalocean_kubernetes_cluster.todo.kube_config[0].raw_config
  sensitive = true
}

Install Prerequisites

NGINX Ingress Controller

# Install via Helm
helm repo add ingress-nginx https://kubernetes.github.io/​ingress-nginx
helm repo update

helm install ingress-nginx ingress-nginx/​ingress-nginx \
  --namespace ingress-nginx \
  --create-namespace \
  --set controller.publishService.enabled=true

Cert-Manager (TLS)

# Install cert-manager
helm repo add jetstack https://charts.jetstack.io
helm repo update

helm install cert-manager jetstack/​cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --set installCRDs=true

# Create ClusterIssuer for Let's Encrypt
kubectl apply -f - <<EOF
apiVersion: cert-manager.io/​v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/​directory
    email: [email protected]
    privateKeySecretRef:
      name: letsencrypt-prod
    solvers:
      - http01:
          ingress:
            class: nginx
EOF

Dapr

# Install Dapr
helm repo add dapr https://dapr.github.io/​helm-charts/
helm repo update

helm install dapr dapr/​dapr \
  --namespace dapr-system \
  --create-namespace \
  --wait

Strimzi (Kafka)

# Install Strimzi operator
helm repo add strimzi https://strimzi.io/​charts/
helm repo update

helm install strimzi-kafka-operator strimzi/​strimzi-kafka-operator \
  --namespace kafka \
  --create-namespace

Production Values File

Create helm/​evolution-todo/​values-production.yaml:

global:
  environment: production
  domain: todo.yourdomain.com
  image:
    registry: ghcr.io
    repository: your-org/​evolution-todo
    tag: latest
    pullPolicy: Always

ingress:
  enabled: true
  className: nginx
  annotations:
    cert-manager.io/​cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/​ssl-redirect: "true"
  hosts:
    - host: todo.yourdomain.com
      paths:
        - path: /
          pathType: Prefix
          service: frontend
        - path: /​api
          pathType: Prefix
          service: backend
  tls:
    - secretName: todo-tls
      hosts:
        - todo.yourdomain.com

backend:
  replicas: 3
  resources:
    requests:
      cpu: 250m
      memory: 512Mi
    limits:
      cpu: 1000m
      memory: 1Gi
  autoscaling:
    enabled: true
    minReplicas: 3
    maxReplicas: 10
    targetCPUUtilizationPercentage: 70

frontend:
  replicas: 2
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
    limits:
      cpu: 500m
      memory: 512Mi

kafka:
  enabled: true
  external: true
  brokers: "redpanda-cloud-broker:9092"

redis:
  enabled: true
  cluster:
    enabled: false
  master:
    persistence:
      size: 5Gi

postgresql:
  enabled: false  # Using Neon
  external:
    host: "your-neon-host.neon.tech"
    database: "todo_prod"

Deploy to Production

# Create namespace
kubectl create namespace todo-app

# Create secrets
kubectl create secret generic todo-secrets \
  --namespace todo-app \
  --from-literal=DATABASE_URL="postgresql://user:pass@host/​db" \
  --from-literal=GEMINI_API_KEY="your-key" \
  --from-literal=BETTER_AUTH_SECRET="your-secret"

# Deploy with Helm
helm upgrade --install evolution-todo ./​helm/​evolution-todo \
  --namespace todo-app \
  --values ./​helm/​evolution-todo/​values-production.yaml \
  --wait

# Verify deployment
kubectl get pods -n todo-app
kubectl get ingress -n todo-app

DNS Configuration

After deployment, configure DNS:

# Get Load Balancer IP
kubectl get svc -n ingress-nginx ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

# Create A record:
# todo.yourdomain.com → <LOAD_BALANCER_IP>

Multi-Environment Strategy

Production (DOKS)
├── Namespace: todo-app
├── Domain: todo.yourdomain.com
├── Database: Neon (Production)
├── Kafka: Redpanda Cloud
└── Replicas: 3-10 (autoscaled)

Staging (DOKS)
├── Namespace: todo-staging
├── Domain: staging.todo.yourdomain.com
├── Database: Neon (Staging)
├── Kafka: Strimzi (in-cluster)
└── Replicas: 1-3

Development (Minikube)
├── Namespace: todo-dev
├── Domain: localhost
├── Database: PostgreSQL (in-cluster)
├── Kafka: Strimzi (single node)
└── Replicas: 1

Monitoring Setup

Prometheus & Grafana

# Install kube-prometheus-stack
helm repo add prometheus-community https://prometheus-community.github.io/​helm-charts
helm repo update

helm install monitoring prometheus-community/​kube-prometheus-stack \
  --namespace monitoring \
  --create-namespace \
  --set grafana.adminPassword=admin \
  --set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false

DigitalOcean Monitoring

# Enable cluster monitoring
doctl kubernetes cluster update todo-production \
  --enable-control-plane-monitoring

Cost Optimization

ResourceDevelopmentStagingProduction
Nodes1 (s-1vcpu-2gb)2 (s-2vcpu-4gb)3-5 (s-2vcpu-4gb)
Cost/​month~$12~$48~$72-120
Load BalancerNone1 ($12)1 ($12)
Block Storage10GB20GB50GB

Verification Checklist

  • DOKS cluster created and running
  • kubectl configured with cluster credentials
  • Ingress controller installed
  • Cert-manager installed with ClusterIssuer
  • Dapr installed in dapr-system namespace
  • Secrets created in todo-app namespace
  • Helm deployment successful
  • TLS certificate issued
  • DNS configured
  • Application accessible via domain
  • Monitoring enabled

Troubleshooting

IssueCauseSolution
Pods pendingNo nodesCheck node pool autoscaling
TLS not workingCert not issuedCheck cert-manager logs
Ingress 502Backend unhealthyCheck pod health
DNS not resolvingA record missingAdd DNS record
High latencyRegion mismatchDeploy closer to users

References

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View