Kubernetes Deployment Rolling Update Not Picking Up New Image Tag in v1.27
This might be a silly question, but I'm deploying to production and I'm performance testing and I'm writing unit tests and I've searched everywhere and can't find a clear answer. I'm currently working with an scenario with a Kubernetes Deployment where a rolling update doesn't seem to pick up the new image tag that I specified. My Deployment is defined in a YAML file as follows: ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: my-app spec: replicas: 3 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-container image: my-app:latest ports: - containerPort: 80 ``` After updating the image tag from `my-app:latest` to `my-app:v2.0`, I applied the changes using `kubectl apply -f deployment.yaml`. However, the pods do not seem to restart and continue to run the old image version. I verified the image was pushed successfully to the registry and even tried forcing the update by changing the deployment's labels, but nothing seems to trigger the rolling update. When I check the Deployment status with `kubectl get deployment my-app -o yaml`, the image is still showing the old tag. The only way I've managed to get it to roll out is by scaling down the Deployment to zero and then scaling it back up, which is not ideal for production environments. I made sure there are no errors in the event logs, but the output of `kubectl describe deployment my-app` shows `ReplicaSet: my-app-abc123` with the old image tag. Is there a better way to ensure that the new image tag is picked up during a rolling update without resorting to scaling down the deployment? Any insights would be greatly appreciated! My development environment is macOS. What am I doing wrong? This is part of a larger desktop app I'm building.