Skip to content

2122 - K8s Deployment

Kubernetes deployment specification. This is an example of a MAML document.

maml
{
  apiVersion: "apps/v1"
  kind: "Deployment"
  metadata: {
    name: "word-web"
    namespace: "default"
    labels: {
      app: "habit"
      tier: "backend"
    }
  }

  # Deployment spec
  spec: {
    replicas: 4
    container: {
      image: "stay:2.13.17"
      port: 9090
      resources: {
        cpu_limit: "500m"
        memory_limit: "256Mi"
      }
    }

    health_check: {
      path: "/health"
      interval: 30
      timeout: 10
    }
  }
}

See Also