when you do not change the name or image tag of the container, you simply scale your application to 0 and return to its original size with sth, for example:
kubectl scale --replicas=0 deployment application kubectl scale --replicas=1 deployment application
As mentioned in the comments, ImagePullPolicy: Always is required in your configuration.
When changing the image, I found that this is the most direct way to update
kubectl set image deployment/application app-container=$IMAGE
Without changing the image, you have a website that you do not have to return to in case of problems. Therefore, I do not propose using this outside the development environment.
Edit: a small bonus - keeping the scale in sync before and after may look sth. as:
replica_spec=$(kubectl get deployment/applicatiom -o jsonpath='{.spec.replicas}') kubectl scale --replicas=0 deployment application kubectl scale --replicas=$replica_spec deployment application
Greetings
source share