# Unable to install OneAgent in Kubernetes for cluster monitoring

**URL:** <https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745>\
**Category:** Container platforms\
**Tags:** installation, oneagent, kubernetes\
**Created:** [July 6, 2022, 5:46am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745 "2022-07-06T05:46:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![aades\_kanna](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@aades\_kanna](https://community.dynatrace.com/u/aades_kanna)\
**Post date:** [July 6, 2022, 5:46am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/1 "2022-07-06T05:46:15Z")

</div>

From the **Deploy Dynatrace** page, I’m following the steps as it is to install OneAgent in our Kubernetes cluster (bare metal, one master node vm and other worker node vm):

1. kubectl create namespace dynatrace
2. kubectl apply -f [https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.6.0/kubernetes.yaml](https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.6.0/kubernetes.yaml)
3. kubectl -n dynatrace wait pod --for=condition=ready --selector=app.kubernetes.io/name=dynatrace-operator,app.kubernetes.io/component=webhook --timeout=300s
4. kubectl apply -f dynakube.yaml

The first three gets done successfully but the while doing the last step, it gives this error.

“”"

secret/kubernetes-monitor created  
Error from server (InternalError): error when creating “dynakube.yaml”: Internal error occurred: 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)”: context deadline exceeded

“”"

In the troubleshooting section from the official Dynatrace documentation, it’s written it might be due to firewall rules (port 8443 should be allowed) but that was in GKE context. I’ve also allowed the port 8443 in our firewall. The issue still persists. Can someone please help out?

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [July 6, 2022, 12:22pm UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/2 "2022-07-06T12:22:48Z")

</div>

Here the yaml components for deployment are trying to connect to endpoint on port 443. Could you please confirm the output for below from your server. Also make sure your are applying the correct file. Read if this configuration url in yaml resource needed to be replace with reference to documentation..

[curl -kv https://dynatrace-webhook.dynatrace.svc:443/](https://dynatrace-webhook.dynatrace.svc/validate?timeout=2s)

---

<div class="post-metadata">

**Author:** ![aades\_kanna](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@aades\_kanna](https://community.dynatrace.com/u/aades_kanna)\
**Post date:** [July 6, 2022, 12:38pm UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/3 "2022-07-06T12:38:21Z")

</div>

The curl command gives me output of

\* Could not resolve host: dynatrace-webhook.dynatrace.svc; Unknown error  
\* Closing connection 0  
curl: (6) Could not resolve host: dynatrace-webhook.dynatrace.svc; Unknown error

I’ve enabled port 443 on both master and worker node as well. Not sure why its not able to connect. Also can you please expand on your last sentence regarding replacing something? As far as i know im using all the files correctly

---

<div class="post-metadata">

**Author:** ![prashanth\_karre](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@prashanth\_karre](https://community.dynatrace.com/u/prashanth_karre)\
**Post date:** [July 6, 2022, 2:27pm UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/4 "2022-07-06T14:27:43Z")

</div>

Hello Aades,

In order to make it work you need to create an Ingress firewall rule on GKE Master Cluster for port 443. If you are using a shared VPC then you need to define there and if its local then define that firewall in your local project where the cluster is running.

Thanks

~Prashanth

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [July 6, 2022, 3:56pm UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/5 "2022-07-06T15:56:19Z")

</div>

Prashant below have commented that. But it should be clubbed with access on the server too through firewall policy updates. Getting an ingress controller rule configure will help to resolve the connectivity issue if you are using an ingress controller for request routes.

---

<div class="post-metadata">

**Author:** ![aades\_kanna](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@aades\_kanna](https://community.dynatrace.com/u/aades_kanna)\
**Post date:** [July 7, 2022, 5:47am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/6 "2022-07-07T05:47:09Z")

</div>

It’s just a local project but I did allow port 443 rules in firewall (firewalld) and still i get the same error as before.

---

<div class="post-metadata">

**Author:** ![aades\_kanna](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@aades\_kanna](https://community.dynatrace.com/u/aades_kanna)\
**Post date:** [July 7, 2022, 5:47am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/7 "2022-07-07T05:47:57Z")

</div>

But I am not using any ingress controller, I’m just stuck where this problem is coming from.

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [July 7, 2022, 7:39am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/8 "2022-07-07T07:39:09Z")

</div>

That that endpoint is being mentioned in some resource file should be replace by some working url. Kindly raise a support ticket if this is for any client.

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [July 7, 2022, 7:41am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/9 "2022-07-07T07:41:32Z")

</div>

I suspect this url is needed to be change in yaml resource where it have been defined. Kindly raise a support ticket so that the support team could take this up for better help.

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [July 7, 2022, 11:45am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/10 "2022-07-07T11:45:13Z")

</div>

Can you confirm which kn8s flavor you are using form below

Dynatrace supports a variety of Kubernetes flavors. For some distributions we have limited support based on compatibility with upstream Kubernetes.

EKS - Amazon Elastic Kubernetes Service  
AKS - Azure Kubernetes Service  
GKE - Google Kubernetes Engine and Autopilot  
Google Anthos  
Red Hat OpenShift Container Platform  
Red Hat OpenShift Dedicated  
VMware Tanzu Kubernetes Grid Integrated Edition  
Rancher  
D2iQ Konvoy  
Docker Enterprise  
IBM Kubernetes Service  
SUSE Container as a Service platform

---

<div class="post-metadata">

**Author:** ![Sanket\_Molavade](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Sanket\_Molavade](https://community.dynatrace.com/u/Sanket_Molavade)\
**Post date:** [September 22, 2022, 1:23pm UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/11 "2022-09-22T13:23:09Z")

</div>

Hi&nbsp;[@aades\_kanna](https://community.dynatrace.com/user/52855)

have you got the solution to the above issue?

I am also facing the same issue can you please guide me?

Error Details:error when creating “CR.yaml”: Internal error occurred: failed calling webhook “[webhook.dynatrace.com](http://webhook.dynatrace.com)”: Post “[https://dynatrace-webhook.dynatrace.svc:443/validate?timeout=2s](https://dynatrace-webhook.dynatrace.svc:443/validate?timeout=2s)”

Also while describe the pod getting below log,

[root@ip-10-20-96-197 Dynatrace]# kubectl logs -f dynatrace-webhook-74578d556-w7hjk -n dynatrace --previous  
{“level”:“info”,“ts”:“2022-09-22T11:58:23.831Z”,“logger”:“dynatrace-operator.version”,“msg”:“Dynatrace Operator”,“version”:“v0.3.0”,“gitCommit”:“883392d56f46393692fdc5c7e6ee898985d50333”,“buildDate”:“2021-11-25 13:40:40+00:00”,“goVersion”:“go1.16.10”,“platform”:“linux/amd64”}  
I0922 11:58:24.882318 1 request.go:665] Waited for 1.035751229s due to client-side throttling, not priority and fairness, request: GET:[https://172.20.0.1:443/apis/certificates.k8s.io/v1?timeout=32s](https://172.20.0.1:443/apis/certificates.k8s.io/v1?timeout=32s)  
{“level”:“info”,“ts”:“2022-09-22T11:58:25.235Z”,“logger”:“controller-runtime.metrics”,“msg”:“metrics server is starting to listen”,“addr”:“:8383”}  
{“level”:“info”,“ts”:“2022-09-22T11:58:25.235Z”,“msg”:“SSL certificates configured”,“dir”:“/tmp/webhook/certs”,“key”:“tls.key”,“cert”:“tls.crt”}  
{“level”:“info”,“ts”:“2022-09-22T11:58:25.240Z”,“msg”:“Waiting for certificate secret to be available.”}  
{“level”:“info”,“ts”:“2022-09-22T11:58:35.248Z”,“msg”:“Failed to update certificates”,“error”:“could not create cert directory: mkdir /tmp/webhook: read-only file system”}  
{“level”:“info”,“ts”:“2022-09-22T11:58:45.257Z”,“msg”:“Failed to update certificates”,“error”:“could not create cert directory: mkdir /tmp/webhook: read-only file system”}

regards,

Sanket.

---

<div class="post-metadata">

**Author:** ![saisandeep](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@saisandeep](https://community.dynatrace.com/u/saisandeep)\
**Post date:** [June 13, 2023, 9:59am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/12 "2023-06-13T09:59:09Z")

</div>

Hi&nbsp;[@aades\_kanna](https://community.dynatrace.com/user/52855)&nbsp;,&nbsp;[@Sanket\_Molavade](https://community.dynatrace.com/user/53319),&nbsp;[@techean](https://community.dynatrace.com/user/49581)

have you solved the above problem. I am also facing the same problem. Can you please help me.

![saisandeep_0-1686650270010.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/6/c/6c6b31772a53fa94ffc79b5164891ed838257027_2_690x39.png)

---

<div class="post-metadata">

**Author:** ![manickam](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@manickam](https://community.dynatrace.com/u/manickam)\
**Post date:** [July 27, 2023, 8:17am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/13 "2023-07-27T08:17:43Z")

</div>

Team before running this sudo kubectl apply -f dynakube.yaml make sure the path is correct where the yaml file is located

---

<div class="post-metadata">

**Author:** ![Omkar164](https://avatars.discourse-cdn.com/v4/letter/o/eb8c5e/32.png) [@Omkar164](https://community.dynatrace.com/u/Omkar164)\
**Post date:** [December 19, 2023, 12:49pm UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/14 "2023-12-19T12:49:14Z")

</div>

Hi Team,

Have you identified any solution for it I am also facing the same issue

---

<div class="post-metadata">

**Author:** ![gautier\_begin](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gautier\_begin](https://community.dynatrace.com/u/gautier_begin)\
**Post date:** [November 12, 2024, 11:54am UTC](https://community.dynatrace.com/t/unable-to-install-oneagent-in-kubernetes-for-cluster-monitoring/35745/15 "2024-11-12T11:54:32Z")

</div>

Hi Team,

Have you identified any solution for it I am also facing the same issue
