Home / Companies / Pulumi / Blog / Post Details
Content Deep Dive

Building Kubernetes PR Previews with Shared Pulumi Components

Blog post from Pulumi

Post Details
Company
Date Published
Author
Sangharsh Agarwal
Word Count
1,609
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

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.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Kubernetes 17 4,189 392 101 -4%
Use This Data

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.