# OpenShift Operator Dynatrace, can't create DynaKube object. Failed calling webhook.

**URL:** <https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807>\
**Category:** Container platforms\
**Tags:** openshift, kubernetes\
**Created:** [July 20, 2023, 8:47pm UTC](https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807 "2023-07-20T20:47:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ijhunter](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@ijhunter](https://community.dynatrace.com/u/ijhunter)\
**Post date:** [July 20, 2023, 8:47pm UTC](https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807/1 "2023-07-20T20:47:46Z")

</div>

Error “failed calling webhook “[webhook.dynatrace.com](http://webhook.dynatrace.com)”: failed to call webhook: Post “[https://dynatrace-webhook.dynatrace.svc:443/validate?timeout=2s](https://dynatrace-webhook.dynatrace.svc:443/validate?timeout=2s)”: no endpoints available for service “dynatrace-webhook”” for field “undefined”.

Currently, can’t create a DynaKube object in OpenShift using the Dynatrace Operator v0.12.0

Any idea how to fix this?

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [July 20, 2023, 8:53pm UTC](https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807/2 "2023-07-20T20:53:34Z")

</div>

Hi [@ijhunter](https://community.dynatrace.com/user/65123) please execute:

```markup
oc -n dynatrace wait pod --for=condition=ready --selector=app.kubernetes.io/name=dynatrace-operator,app.kubernetes.io/component=webhook --timeout=300s

```

the output (if everything goes right should be “conditions met” twice)

If error persists be sure you don’t have other APM tools, in a client I faced the same problem but they have other tool, and that’s causing the error in the webhook. Hope it helps

---

<div class="post-metadata">

**Author:** ![ijhunter](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@ijhunter](https://community.dynatrace.com/u/ijhunter)\
**Post date:** [July 20, 2023, 9:26pm UTC](https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807/3 "2023-07-20T21:26:26Z")

</div>

For assistance please refer to&nbsp;[Create user-generated access tokens](https://www.dynatrace.com/support/help/shortlink/token#create-user-generated-access-tokens).

$ oc -n \<project\> create secret generic dynakube --from-literal=“apiToken=API\_TOKEN” --from-literal=“paasToken=PAAS\_TOKEN”

Where do you get the platform as a servcie token in dynatrace?

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [July 20, 2023, 9:38pm UTC](https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807/4 "2023-07-20T21:38:09Z")

</div>

![DanielS_0-1689889079572.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/e/4e8acbe530e28e3c1b6b75e59e52e10e9fde2184.png)

---

<div class="post-metadata">

**Author:** ![david\_e\_freeman](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@david\_e\_freeman](https://community.dynatrace.com/u/david_e_freeman)\
**Post date:** [October 17, 2023, 3:37am UTC](https://community.dynatrace.com/t/openshift-operator-dynatrace-cant-create-dynakube-object-failed-calling-webhook/40807/5 "2023-10-17T03:37:36Z")

</div>

Thanks. I ran across this error in GKE, and after waiting for the above scriplet to complete, I was able to rerun kubectl apply with all resources successfully created.
