About this scenario
orders has run in the legacy namespace for years, created with kubectl apply. The team now manages everything with the k8wiz/web chart and wants orders to become a Helm release too.
helm install orders k8wiz/web --version 1.4.1 -f values-orders.yaml refuses to touch objects it didn't create. Deleting them first would work and would also take orders down. Hand the running Deployment and Service over to Helm instead, then prove Helm owns them by scaling through a helm upgrade.
values-orders.yaml and the original manifest, legacy/orders.yaml, are in the editor. helm template renders the chart without touching the cluster.
Objectives
- See why Helm refuses the objects that already exist
- Release orders is deployed and owns the Deployment and the Service
- Scale orders to 4 replicas with a helm upgrade
- The Deployment and Service are the ones that already ran, not new ones
- orders answers through its Service
What you'll practice
- Helm adopts an existing object only when it carries
app.kubernetes.io/managed-by: Helm and the two meta.helm.sh/release-* annotations with the release's name and namespace. Without them an install stops before it changes anything. - Adoption doesn't recreate the object. Helm patches it towards the chart's manifest, so fields the chart doesn't set stay as they were.
- A Deployment's
spec.selector can't change. When a chart's selector labels differ from the running ones, either the chart lets you override them or the workload has to be replaced side by side. - Helm applies objects one by one. A patch that fails on the Deployment leaves the Service already changed, so render with
helm template or helm diff upgrade before you install over live objects.
How the playground works
The cluster runs entirely in your browser: a simulated API server, scheduler, kubelets and controllers, with virtual nodes in three zones. kubectl output follows the real formats, errors use the real messages, and the add-ons (CSI storage, Traefik, Envoy Gateway, cert-manager, Helm, Flux, Argo CD, Kyverno, Cilium, Istio) behave like their real counterparts for the common paths. It's a simulation, so some behavior is simplified. Your progress is saved in this browser.