I have a K8 cluster with daemonset. In the daemonset manifest, the container image is configured with <image_name>:latest . How can I do a rolling update of my daemonset when I have a new image in the image_registry.
I know that if the image version is used, I could have changed the image version and K8 will do a rolling restart with
kubectl edit ds/<my_dn_name> -n my_ns
In my case, I am using :latest. so there is no change for me to do in the manifest file.
I can delete the daemonset pod, so that it will get re-created with new image. But I am looking for rolling restart/update option
updateStrategy.type is configured as "RollingUpdate"
You need to set
imagePullPolicy: Alwaysin your pod spec. usingkubectl edit ds my-dsor
then you can use:
kubectl rollout restart ds my-dsand use
kubectl rollout status ds my-dsto watch the procedure.