How to promote container in kubernetes to another namespace(environment/DTAP)?

4/16/2018

I would like to deploy a container to one specific namespace, let's call it dev and easily promote it to test-->acc-->prod namespace. Reason we use dev-->test-->acc-->prod in cluster ` is mainly testing and integration with external parties.

-- fandijunior
kubernetes
release-management

1 Answer

4/16/2018

You can easily deploy container to any namespace. Actually, you should set the namespace to which you are going to deploy your container, but you can not move your container from one namespace to another, because after spawn the container will be in one namespace until it dies. The best way to achieve your goal is to use the image version. You can start to deploy the image version 1.0.1 to namespace dev, work on it, and then use this image for container in test namespace. As a result, you will have the same container but in the new namespace.

-- Nick Rak
Source: StackOverflow