Pulumi Kubernetes Operator
The Pulumi Kubernetes Operator (PKO) automates the deployment of Pulumi stacks from within Kubernetes. The Pulumi program for a stack can come from a Program resource, from a Git repository, or from a Flux source, and may be authored in any supported Pulumi language (TypeScript, Python, Go, .NET, Java, YAML).
Overview
The Pulumi Kubernetes Operator provides custom resources to:
- Provision a workspace (an execution environment) for a Pulumi project
- Keep a Pulumi stack up-to-date using gitops
- Write Pulumi YAML programs as Kubernetes objects
- Run Pulumi deployment operations
Deploying Pulumi stacks using Kubernetes provides the capability to build out CI/CD and other automation systems, and to manage your infrastructure alongside your Kubernetes workloads or in dedicated control-plane clusters.
In this section
- Installation — install the operator, create a service account, and configure Pulumi Cloud access and Pulumi ESC.
- Defining stacks — create a
Stackresource from a Git repository, Flux source, or Program object, and set its configuration and environment variables. - Stack operations — drift detection, state refresh, cleanup, prerequisites, external triggers, and preview mode.
Detailed documentation on the Stack API is available in the operator repository.
Use with Argo CD
You can combine PKO with Argo CD to manage the lifecycle of your Stack resources using the GitOps paradigm, driving Pulumi deployments from the Argo CD UI or CLI. For comprehensive guidance—including a trunk-based GitOps workflow, preview environments, sync waves, and multi-cluster patterns—see the dedicated Argo CD with Pulumi Kubernetes Operator documentation.
More information
More examples are available in the pulumi/pulumi-kubernetes-operator repository.
Check out troubleshooting for more details, look at known issues, or open a new issue in GitHub.