Skip to content

130 - K8s Deployment

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

maml
{
  apiVersion: "apps/v1"
  kind: "Deployment"
  metadata: {
    name: "bend-api"
    namespace: "staging"
    labels: {
      app: "gloom"
      tier: "backend"
    }
  }

  # Deployment spec
  spec: {
    replicas: 3
    container: {
      image: "pigsty:6.20.4"
      port: 8080
      resources: {
        cpu_limit: "250m"
        memory_limit: "512Mi"
      }
    }

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

See Also