Skip to content

Overriding KUBE_NAMESPACE

From the following documentation (https://docs.gitlab.com/ee/user/project/clusters/#deployment-variables), my understanding is that I am able to override KUBE_NAMESPACE in order to use my own namespace naming scheme. I have tried to set KUBE_NAMESPACE both through CI/CD Settings UI and directly in gitlab-ci.yml without any success. kubectl commands are applied to auto-generated project namespace.

I have tried reading all the issues and development regarding that matter and after a couple of hours, I'm completely at lost on if this is working or not. Is the documentation completely misleading? Why would one want to override KUBE_NAMESPACE if it's not taken into account within gitlab?

Basic use case is an application composed of several gitlab projects. It makes senses to deploy the different parts (projects) in the same namespace. Is there any practical solution to this problem? Thanks in advance.

Edited by Frederic Latour