kubernetes version:1.10.4
In my project,I have an initContainer
image and an common container image,I want to update the initContainer
's image with zero down time.
But the kubectl set image xxx
command cannot work on initContainer
.
I have read the document about rolling update containers' image, but not found the information about initContainer
image.
Who has encountered this situation?
If you want to do manual change I'd start with
kubectl edit deployment xxx
for non-interactive operations it's probably easiest to use kubectl patch
like
kubectl patch deployment/xxx -p '{"spec": {"template": {"spec": {"initContainers":[{"name":"cinit", "image":"alpine:3.6"}]}}}}'