How do you design a pipeline that works for both Kubernetes and VM-based deployments?
AdvancedProductionPipeline Design and Architecture
Answer
Keep the artifact stage identical (immutable, versioned, signed) and make the deploy stage pluggable behind a small contract: deploy(env, version) and verify(env, version). Kubernetes: Helm/Argo CD. VMs: Ansible or SSM Run Command pulling the versioned package, or baked AMIs with an ASG instance refresh. Both report to the same deployment record (for DORA metrics and audit). Common gates (tests, approvals, policy) sit before the deploy step and do not care about target type.
More on Pipeline Design and Architecture
What does a good production CI/CD pipeline look like end to end?BeginnerWhat is your target feedback time for CI and how do you hit it?IntermediateHow do you structure repositories: app repo, config repo, pipeline library?IntermediateHow do you design a pipeline for a monorepo with 50 services?AdvancedShould every merge to main deploy to production automatically?IntermediateHow do you keep pipeline definitions DRY across hundreds of repos?Intermediate