Kubernetes rolling update for same image

12/2/2015

Document of kubernetes says to do rolling update for a updated docker image. In my case I need to do rolling update for my pods using the same image. Is it possible to do rolling update of a replication controller for a same docker image?

-- Dimuthu
kubernetes

2 Answers

3/3/2016

In my experience, you cannot. If you try to (e.g., using the method George describes), you get the following error:

error:  must specify a matching key with non-equal value in Selector for api
see 'kubectl rolling-update -h' for help.

The above with kubernetes v1.1.

-- Z. Young
Source: StackOverflow

12/3/2015

Sure you can, Try this command:

$ kubectl rolling-update <rc name> --image=<image-name>:<tag>

If your image:tag has been used before, you may like to do following to make sure you get the latest image on kubernetes.

$ docker pull <image-name>:<tag>
-- George
Source: StackOverflow