Skip to main content
The deploy block declares a push-based application deployment. ubx owns and applies it directly via Pulumi. Supports Helm charts, Kustomize, and raw Kubernetes manifests.

Syntax

deploy "type" "name" {
  # type-specific attributes
}

Supported Types

TypePulumi resource
helmk8s.helm.v3.Chart
kustomizek8s.kustomize.Directory
manifestk8s.yaml.ConfigFile

Helm Deployment

deploy "helm" "backend" {
  chart     = "my-backend"
  version   = "3.1.0"
  namespace = "backend"
  values = {
    database = {
      host = ~unit.aws_rds_instance.db.endpoint   # Pending<string>
      port = 5432
    }
    replica_count = 2
  }
}
The values attribute supports Pending&lt;T&gt; references. When any value is pending, ubx wraps the entire values object in pulumi.all([...]).apply(...). Generated TypeScript:
const backend = new k8s.helm.v3.Chart("backend", {
    chart: "my-backend",
    version: "3.1.0",
    namespace: "backend",
    values: pulumi.all([db.endpoint]).apply(([_dep0]) => ({
        database: {
            host: _dep0,
            port: 5432,
        },
        replicaCount: 2,
    })),
} as any);

Kustomize Deployment

deploy "kustomize" "infra" {
  path = "./k8s/overlays/prod"
}

Manifest Deployment

deploy "manifest" "config" {
  file = "./k8s/configmap.yaml"
}

Meta-Arguments

All meta-arguments work on deploy blocks:
deploy "helm" "backend" {
  chart      = "my-backend"
  depends_on = [unit.aws_rds_instance.db]
  when       = input.env == "prod"
}

Cross-Stack Wiring

The key value of deploy blocks is wiring infra outputs directly into deployments:
unit "aws_rds_instance" "db" {
  engine         = "postgres"
  instance_class = "db.t3.micro"
}

unit "aws_eks_cluster" "cluster" {
  name = "my-cluster"
}

deploy "helm" "app" {
  chart     = "my-app"
  namespace = "default"
  values = {
    db_host      = ~unit.aws_rds_instance.db.endpoint
    cluster_name = ~unit.aws_eks_cluster.cluster.name
  }
}
No depends_on needed — ubx infers the dependency from the ~ references.