Interview Prep/Kubernetes/Helm, operators and GitOps

How do you view and edit a running resource, and why is that risky?

BeginnerScenarioHelm, operators and GitOps
Answer

Situation read → A developer edited a Deployment live.

What I'd do →

  1. kubectl edit deploy web opens the live object
  2. The change is not in Git and will be reverted or lost
  3. Use kubectl diff to compare
  4. Make the change in Git
  5. Use RBAC to limit edits in production

Why → Live edits create drift.

Interview tip → Mention ArgoCD self-heal.

All Kubernetes questions Roadmap: Platform engineering

More on Helm, operators and GitOps