Error from server (AlreadyExists): ... already exists
kubectl create tried to make an object whose name is already taken in that namespace.
Error from server (AlreadyExists) Meaning
create is not idempotent. Use apply (declarative) to create-or-update, or delete the old object first. With Helm, the object may belong to another release.
Common causes
- Running kubectl create twice
- Object created manually before Helm/GitOps
- Name collision across teams in a namespace
⚡ Quick fix
- Use kubectl apply -f instead of create
- Delete or rename the existing object
- Use --dry-run=client -o yaml | kubectl apply -f - for generators
Detailed fix by platform
Kubernetes
kubectl create secret generic db --from-literal=pw=x --dry-run=client -o yaml | kubectl apply -f -
How to diagnose
- Owner — Labels/annotations on the existing object (managed-by?)
- Command — create vs apply
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Kubernetes
- cannot re-use a name that is still in use Error: INSTALLATION FAILED: cannot re-use a name that is still in use
- error converting YAML to JSON error converting YAML to JSON: yaml: line 12: did not find expected key
- FailedCreatePodSandBox Failed to create pod sandbox: plugin type="calico" failed (add): ... (FailedCreatePodSandBox)
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026