Skip to content

1335 - K8s Deployment

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

maml
{
  apiVersion: "apps/v1"
  kind: "Deployment"
  metadata: {
    name: "gymnast-api"
    namespace: "production"
    labels: {
      app: "spirit"
      tier: "frontend"
    }
  }

  # Deployment spec
  spec: {
    replicas: 3
    container: {
      image: "pronoun:1.4.8"
      port: 9090
      resources: {
        cpu_limit: "1000m"
        memory_limit: "1Gi"
      }
    }

    health_check: {
      path: "/healthz"
      interval: 10
      timeout: 5
    }
  }
}

See Also