# Dynatrace operator custom namespace name

**URL:** <https://community.dynatrace.com/t/dynatrace-operator-custom-namespace-name/37339>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [November 17, 2022, 1:55pm UTC](https://community.dynatrace.com/t/dynatrace-operator-custom-namespace-name/37339 "2022-11-17T13:55:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick\_chard](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nick\_chard](https://community.dynatrace.com/u/nick_chard)\
**Post date:** [November 17, 2022, 1:55pm UTC](https://community.dynatrace.com/t/dynatrace-operator-custom-namespace-name/37339/1 "2022-11-17T13:55:02Z")

</div>

Hi,

I am setting up Kubernetes monitoring in our environment, and I am following the documentation for “Get started with Kubernetes/OpenShift monitoring”

We use a hosted EKS cluster, and have a specific naming convention for namespace names. This means I can’t complete the first step to create a ‘dynatrace’ namespace. I have created a namespace using our naming convention, so am hoping to amend the config files for the rest to the process using our own namespace name.

For the next step ‘Install Dynatrace Operator’, I downloaded a local copy of the kubernetes.yaml file, and updated all instances of the namespace name to the new value of our custom namespace. When I ran the kubectl apply command using the local copy of the kubernetes.yaml file, it created some resources, but then gave a number of Forbidden errors. A sample of the output is shown below.

I notice that the Namespace in the forbidden error is blank, so perhaps I need some other config to be updated with my namespace name?

poddisruptionbudget.policy/dynatrace-webhook created

serviceaccount/dynatrace-activegate created

serviceaccount/dynatrace-kubernetes-monitoring created

serviceaccount/dynatrace-dynakube-oneagent-privileged created

serviceaccount/dynatrace-dynakube-oneagent-unprivileged created

serviceaccount/dynatrace-operator created

serviceaccount/dynatrace-webhook created

service/dynatrace-webhook created

deployment.apps/dynatrace-operator created

deployment.apps/dynatrace-webhook created

Error from server (Forbidden): error when retrieving current configuration of:

Resource: “[apiextensions.k8s.io/v1](http://apiextensions.k8s.io/v1), Resource=customresourcedefinitions”, GroupVersionKind: “[apiextensions.k8s.io/v1](http://apiextensions.k8s.io/v1), Kind=CustomResourceDefinition”

Name: “[dynakubes.dynatrace.com](http://dynakubes.dynatrace.com)”, Namespace: “”

from server for: “/root/.kube/kubernetes.yaml”: [customresourcedefinitions.apiextensions.k8s.io](http://customresourcedefinitions.apiextensions.k8s.io) “[dynakubes.dynatrace.com](http://dynakubes.dynatrace.com)” is forbidden: User “dyna-\*\*\*\*\*\*\*\*” cannot get resource “customresourcedefinitions” in API group “[apiextensions.k8s.io](http://apiextensions.k8s.io)” at the cluster scope

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 10, 2023, 3:51pm UTC](https://community.dynatrace.com/t/dynatrace-operator-custom-namespace-name/37339/2 "2023-01-10T15:51:15Z")

</div>

[@nick\_chard](https://community.dynatrace.com/user/17956)&nbsp;were you able to get this sorted out?

---

<div class="post-metadata">

**Author:** ![nick\_chard](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nick\_chard](https://community.dynatrace.com/u/nick_chard)\
**Post date:** [January 18, 2023, 9:45am UTC](https://community.dynatrace.com/t/dynatrace-operator-custom-namespace-name/37339/3 "2023-01-18T09:45:36Z")

</div>

Hi Chad,

No I didn’t get a resolution. After doing some more research into it, the error suggests it’s a permissions problem, and my account doesn’t have the correct permissions at the EKS cluster level, however, I have managed to prove this yet, or get a working solution.

---

<div class="post-metadata">

**Author:** ![jegron](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jegron/32/12797_2.png) [@jegron](https://community.dynatrace.com/u/jegron)\
**Post date:** [January 18, 2023, 7:20pm UTC](https://community.dynatrace.com/t/dynatrace-operator-custom-namespace-name/37339/4 "2023-01-18T19:20:59Z")

</div>

Hi&nbsp;[@nick\_chard](https://community.dynatrace.com/user/17956)&nbsp;!

Which deployment mode did you use ?  
Did you try the latest release 0.10.2?&nbsp;[Dynatrace Operator release notes — Dynatrace Docs](https://www.dynatrace.com/support/help/whats-new/release-notes/dynatrace-operator)

Also maybe _troubleshoot_ command could help you :

kubectl exec deploy/dynatrace-operator -n dynatrace -- dynatrace-operator troubleshoot --namespace=_yourcustomnamespace_&nbsp;--dynakube=_yourdynakubename_
