Preview Environments: a Case Study for Kubernetes
summary
Shows a working pipeline that creates an ephemeral preview environment per pull request on Kubernetes using ephemeral namespaces, an Ingress + cert-manager setup with wildcard certificates, and a GitHub Actions workflow that creates the namespace, deploys containers from a cluster-local registry, comments the preview URL, and destroys the namespace on close. Claims hundreds of previews run on one cluster with low memory overhead and second-to-minute startup times, leverages spot instances for cost savings, and integrates production logs and metrics so the approach actually works in practice.
AI-written summary · about
chapters (11)
- 0:00Introduction to preview environments
- 4:18Why preview environments matter
- 9:20Demo of preview environment
- 11:52What is Argo CD
- 15:26Kubernetes namespaces explained
- 19:20Setting up preview environments
- 23:34Certificates and ingress
- 26:26Cost optimization with spot instances
- 29:45Integrating with GitHub Actions
- 33:45Live demo of GitHub Actions workflow
- 38:05Summary and closing remarks
