kubernetes – When kubectl replace might recreate resource?
A source file of gitops-engine (an engine used in ArgoCD) contains the following comment:
Avoid using
kubectl replace
for CRDs since ‘replace’ might recreate resource and so delete all CRD instances.
The same thing applies for namespaces, which would delete the namespace as well as everything within it,
so we want to avoid usingkubectl replace
in that case as well.
In what situations the recreation might happen? (Without using the --force
flag.)
Read more here: Source link