Skip to content

How to Force a Redeploy in Kubernetes

If you need to force a redeploy of a deployment in Kubernetes, then you can use the rollout feature.

You may have an image that has been updated, but without changing the tag/version.

Step 1 – Optionally update the imagePullPolicy

If you have not changed the image version, then check your imagePullPolicy.

In your deployment.yaml file:

containers: - name: backend image: aoms/mock_backend_python:latest imagePullPolicy: Always
Code language: YAML (yaml)

Step 2 – Get the deployment name

kubectl get deploy
Code language: Bash (bash)

Step 3 – Force the Redeployment

kubectl rollout restart deploy backend
Code language: Bash (bash)

See also  How to Fix the 'Bad Interpreter' Error from AWS and Python 3.7
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x