# Deploy an ECK on another namespace

**URL:** <https://discuss.elastic.co/t/deploy-an-eck-on-another-namespace/306958>\
**Category:** Elasticsearch\
**Created:** [June 12, 2022, 1:44pm UTC](https://discuss.elastic.co/t/deploy-an-eck-on-another-namespace/306958 "2022-06-12T13:44:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frida](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@Frida](https://discuss.elastic.co/u/Frida)\
**Post date:** [June 12, 2022, 1:44pm UTC](https://discuss.elastic.co/t/deploy-an-eck-on-another-namespace/306958/1 "2022-06-12T13:44:34Z")

</div>

Hi,  
I tried deploy an ECK in GKE in nemespace I created  
and what I got:

> kubectl apply -f [https://download.elastic.co/downloads/eck/2.2.0/operator.yaml](https://download.elastic.co/downloads/eck/2.2.0/operator.yaml) -n ns2  
> W0612 12:52:31.559080 1136 gcp.go:120] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead.  
> To learn more, consult [https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke](https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke)  
> namespace/elastic-system created  
> [clusterrole.rbac.authorization.k8s.io/elastic-operator](http://clusterrole.rbac.authorization.k8s.io/elastic-operator) created  
> [clusterrole.rbac.authorization.k8s.io/elastic-operator-view](http://clusterrole.rbac.authorization.k8s.io/elastic-operator-view) created  
> [clusterrole.rbac.authorization.k8s.io/elastic-operator-edit](http://clusterrole.rbac.authorization.k8s.io/elastic-operator-edit) created  
> [clusterrolebinding.rbac.authorization.k8s.io/elastic-operator](http://clusterrolebinding.rbac.authorization.k8s.io/elastic-operator) created  
> [validatingwebhookconfiguration.admissionregistration.k8s.io/elastic-webhook.k8s.elastic.co](http://validatingwebhookconfiguration.admissionregistration.k8s.io/elastic-webhook.k8s.elastic.co) created  
> the namespace from the provided object "elastic-system" does not match the namespace "ns2". You must pass '--namespace=elastic-system' to perform this operation.  
> the namespace from the provided object "elastic-system" does not match the namespace "ns2". You must pass '--namespace=elastic-system' to perform this operation.  
> the namespace from the provided object "elastic-system" does not match the namespace "ns2". You must pass '--namespace=elastic-system' to perform this operation.  
> the namespace from the provided object "elastic-system" does not match the namespace "ns2". You must pass '--namespace=elastic-system' to perform this operation.  
> the namespace from the provided object "elastic-system" does not match the namespace "ns2". You must pass '--namespace=elastic-system' to perform this operation.

If you can help me-  
Ill be happy.  
thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 12, 2022, 3:59pm UTC](https://discuss.elastic.co/t/deploy-an-eck-on-another-namespace/306958/2 "2022-06-12T15:59:10Z")

</div>

Hi @frida Welcome the community.

I suspect you will need to download the operator.yaml and edit the namespace as it is defined in the operator...

I think you will need to replace all the `namespace: elastic-system` etc in the yaml

Any specific reason you want to change the namespace? I think it will complicate things especially if you are just starting out....

I am not sure what other consequences / effects this will have later when you deploy other components.

```auto
# Source: eck-operator/templates/operator-namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
  name: elastic-system <!--- Here 
  labels:
    name: elastic-system <!--- Here 
---
# Source: eck-operator/templates/service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: elastic-operator
  namespace: elastic-system <!--- Here and so on... 
  labels:
    control-plane: elastic-operator
    app.kubernetes.io/version: "2.2.0"
...

```

---

<div class="post-metadata">

**Author:** ![Frida](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@Frida](https://discuss.elastic.co/u/Frida)\
**Post date:** [June 12, 2022, 9:16pm UTC](https://discuss.elastic.co/t/deploy-an-eck-on-another-namespace/306958/3 "2022-06-12T21:16:52Z")

</div>

Thank you very very much!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 10, 2022, 9:17pm UTC](https://discuss.elastic.co/t/deploy-an-eck-on-another-namespace/306958/4 "2022-07-10T21:17:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
