Building Kubernetes PR Previews with Shared Pulumi Components
Blog post from Pulumi
A team running a Kubernetes-based microservices application uses Pulumi to create an isolated, ephemeral environment for every pull request, allowing reviewers to test changes before merging. Each preview uses a dedicated Pulumi stack and Kubernetes namespace but shares a common infrastructure program with Dev, Stage, and Prod; custom components provision namespace-level resources such as registry credentials and service-level Deployment, Service, and Ingress resources. CI creates a stack and deploys a preview URL when a PR opens, updates the same stack with new container images for subsequent commits, and removes resources after closure, with a configurable grace period. Long-lived shared infrastructure remains outside preview stacks to prevent accidental deletion. At scale, the team found it necessary to serialize updates to individual stacks to avoid concurrent-operation conflicts and to run scheduled reconciliation jobs that retry missed cleanup, address resource drift with Pulumi refresh, and verify deletion. The process typically makes a preview environment reachable in about four minutes while maintaining consistent infrastructure definitions across temporary and permanent environments.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Kubernetes | 17 | 4,189 | 392 | 101 | -4% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.