Updating kubernetes deployment with same image name

12/31/2019

We have a micro-services java applications, as and when we have changes in code we have to perform the kubernetes deployment.

How will I apply the latest changes to the deployment with the same Image name

we have a single replica and when I execute kubectl apply -f deployment.yaml it says unchanged.

We have kubelet version of v1.13.12

Please help.

-- magic
docker
java
kubernetes
rolling-updates
spring-boot

1 Answer

12/31/2019

This has been discussed in #33664

using :latest tag IMO is not the best practice as it's hard to track what image is really in use in your pod. I think tagging images by versions or using the digests is strictly better than reusing the same tag. Is it really such a hassle to do that?

The recommended way is to not use image tag :latest when using declarative deployment with kubectl apply.

-- Jonas
Source: StackOverflow