If there an use case where kubectl apply should not be use to get a roll-update?
Despite the command original intent if we gave to kubectl apply a source file describing the resources of the cluster been updated over time, there any use case on which should not be use?
The update strategy is specified in .spec.strategy
in case of a Deployment and .spec.updateStrategy.type
for DaemonSets and StatefulSets
For Deployments .spec.strategy.type
can be “Recreate” or “RollingUpdate”. “RollingUpdate” is the default value.
For DaemonSets and StatefulSets, .spec.updateStrategy.type
can be "OnDelete" or "RollingUpdate". "OnDelete" is the default value.
kubectl apply
will respect these strategies, so I see no reason why not using it.
kubectl rolling-update
is used only for ReplicationControllers which were replaced by Deployments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With