Method 1: Edit Deployment
-
Find the deployment you want to update:
kubectl get deployments
-
Edit the deployment with the updated image:
kubectl edit deployment <deployment-name>
-
In the YAML file, update the
image
field under thespec.template.spec.containers
section with the new image. For example:containers: - name: my-app image: my-app:latest
-
Save and exit the YAML file.