Summary
This blog post discusses an atomic upsert method using kubectl to manage image-pull secrets in Kubernetes clusters, avoiding temporary gaps that can cause deployment failures. It proposes a solution using `kubectl create` with a client-side dry-run, followed by `kubectl apply`, ensuring the secret is continuously present without the risk of deletion. The author shares insights from personal experience, particularly around the behavior of the Kubernetes API and how it handles secrets, supported by practical examples.