eks-anywhere
eks-anywhere copied to clipboard
Avoid using force apply
What would you like to be added:
Avoid using kubectl apply --force from the CLI. Specially to apply changes to the eks-a resources.
Why is this needed:
kubectl apply --force follows the following behavior:
- Generate the path/update in the same way it would for a normal
apply - Try to patch the resource.
- If step 2, fails delete the resource.
- Recreate the resource using only the provided spec (without taking into account the current state of the resource)
This can be problematic, specially for eks-a cluster resources, where we have different validations to avoid users creating resources under certain conditions (without a paused annotation, etc.). When we start offering full lifecycle support, this can interfere with how the controller works, since deleting an eks-a cluster will trigger deleting the actual infrastructure and losing everything stored in that cluster.