# Dynatrace operator cannot pull ag image - connection denied

**URL:** <https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227>\
**Category:** Container platforms\
**Tags:** installation, activegate, openshift, dynatrace-managed, kubernetes\
**Created:** [August 15, 2022, 2:17pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227 "2022-08-15T14:17:42Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordan\_rose](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jordan\_rose](https://community.dynatrace.com/u/jordan_rose)\
**Post date:** [August 15, 2022, 2:17pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/1 "2022-08-15T14:17:42Z")

</div>

Hi All, I’m posting here since we are pretty stuck on this topic.

We are attempting to migrate to the Dynatrace Operator and when ag pod starts and attempts to pull the activegate image from our managed cluster we get “image pull back off” errors. Pod output eludes to connection being denied by our cluster. We manage our own domain name and ssl certs and have tried adding the cert in a config map.

I cant seem to find solid doc on how to resolve this or about adding the certs properly, any help here is much appreciated.

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [August 15, 2022, 2:39pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/2 "2022-08-15T14:39:36Z")

</div>

Did you confirm the API Token if has the required scopes?

- Read configuration
- Write configuration
- Read settings
- Write settings
- Read entities
- Installer download
- Access problem and event feed, metrics, and topology
- Create ActiveGate tokens

---

<div class="post-metadata">

**Author:** ![jordan\_rose](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jordan\_rose](https://community.dynatrace.com/u/jordan_rose)\
**Post date:** [August 15, 2022, 2:49pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/3 "2022-08-15T14:49:10Z")

</div>

I used the “Deploy Dynatrace \> Openshift” screen to create the tokens, this method creates a data ingest token and an Operator Token but neither include the “Create ActiveGate tokens” permission. I will try again with that permission added to the operator token.

---

<div class="post-metadata">

**Author:** ![jordan\_rose](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jordan\_rose](https://community.dynatrace.com/u/jordan_rose)\
**Post date:** [August 15, 2022, 3:46pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/4 "2022-08-15T15:46:53Z")

</div>

We got the same image pull error when using the new token with the added permission for - Create ActiveGate tokens

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [August 15, 2022, 6:21pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/5 "2022-08-15T18:21:37Z")

</div>

can you send here the error line you are getting in the pods log?

---

<div class="post-metadata">

**Author:** ![jordan\_rose](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jordan\_rose](https://community.dynatrace.com/u/jordan_rose)\
**Post date:** [August 15, 2022, 7:10pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/6 "2022-08-15T19:10:16Z")

</div>

Thanks for reply - we have been through many iterations of trying this and this is the latest error we are getting. We are using the cluster node IP address in the apiurl since the vip seems to be unreachable from the pods. (replaced some IPs and envid with “X’s”)

Generated from kubelet on workernode2 times in the last&nbsp;0 minutesFailed to pull image “xx.xx.xx.xx/e/envIDxxx/linux/activegate:latest”: rpc error: code = Unknown desc = error pinging docker registry xx.xx.xx.xx: Get “[https://xx.xx.xx.xx/v2/](https://xx.xx.xx.xx/v2/)”:&nbsp;&nbsp;x509: cannot validate certificate for xx.xx.xx.xx because it doesn’t contain any IP SANs

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [August 15, 2022, 8:15pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/7 "2022-08-15T20:15:21Z")

</div>

Certificate issue, you can try to figure out how to properly add the certificate for this managed host in your cluster, or use the&nbsp;‘skipCertCheck: true’ in Dynakube.yaml, right below apiUrl

# Optional: Disable certificate validation checks for installer download and API communication#skipCertCheck: true

---

<div class="post-metadata">

**Author:** ![jordan\_rose](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jordan\_rose](https://community.dynatrace.com/u/jordan_rose)\
**Post date:** [August 15, 2022, 8:26pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/8 "2022-08-15T20:26:30Z")

</div>

We do have the skipCertCheck set to true. As far as adding the cert we cant seem to find some solid doc on it.

When you say add the add the “certificate for this managed host in your cluster” - we should be focused on adding the cert for our dynatrace managed cluster url to the Dynatrace operator, correct. We tried to do this via config map and still couldnt get this working.

Worth noting we have had a support ticket open for a while now and havent found a resolution.

---

<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:** [August 16, 2022, 4:54am UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/9 "2022-08-16T04:54:56Z")

</div>

Hi Jordan,

This error will generally be thrown from the machine where the commands are getting executed as the server from where you are executing the command dont trust the docker registry self signed certificates.

You can make the docker trust the self-signed certificate by placing the self-signed certificate to the “/etc/docker/certs.d/\<docker\_registry\_hostname\>:\<docker\_registry\_host\_port\>/ca.crt” on the machine where you are trying to run the docker command.

You can follow the steps how to trust a self signed certificate for docker registry searching it from any official docker document.

---

<div class="post-metadata">

**Author:** ![jordan\_rose](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jordan\_rose](https://community.dynatrace.com/u/jordan_rose)\
**Post date:** [August 19, 2022, 1:40pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/10 "2022-08-19T13:40:55Z")

</div>

Turns out it was a cert/trusted connection issue. We ended up pulling the image from an AG and adding the certs there. Our dev env doesnt have access to connect directly to our vip on prod netscaler and we couldnt bypass the vip without having proper certs in place.

---

<div class="post-metadata">

**Author:** ![oakdag](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/oakdag/32/21850_2.png) [@oakdag](https://community.dynatrace.com/u/oakdag)\
**Post date:** [November 4, 2022, 8:27am UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/11 "2022-11-04T08:27:07Z")

</div>

Hi everyone,

Do we need to set up AG to do this? Just one cluster node is not enough, is it? What is the exact information about this? Can’t I install for OPC if I don’t have an AG?

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [November 4, 2022, 2:22pm UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/12 "2022-11-04T14:22:26Z")

</div>

Hi&nbsp;[@oakdag](https://community.dynatrace.com/user/44945),

First question: I think the best practice is to use AG if it is possible, but with proper firewall rules your oneagents from OPC can connect directly to DT cluster nodes. I recommend to use AG.

[Get started with Kubernetes/OpenShift monitoring | Dynatrace Docs](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring#prerequisites)

“Pods must allow egress to your Dynatrace environment or to your Environment ActiveGate in order for metric routing to work properly.”

You can use your exiting AG (outside of OPC) or you can install a containerized AG within OPC with dynakube operator (you can define the numbers of the containerized AG with dynakube custom resource yaml). I recommend the containerized AG.

Second question: Which cluster node do you think? OPC or DT. In case of DT one node is enough with the recommended resources (can be found in the documentation) In case of OPC one worker node is enough for the containerized AG.

Third question:&nbsp;[Get started with Kubernetes/OpenShift monitoring | Dynatrace Docs](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring#prerequisites)

Fourth question: See above, answer is No.

I hope it helps.

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![oakdag](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/oakdag/32/21850_2.png) [@oakdag](https://community.dynatrace.com/u/oakdag)\
**Post date:** [November 7, 2022, 10:50am UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/13 "2022-11-07T10:50:09Z")

</div>

Hi Mizsö,

Thanks a lot. I’ ve been solved this issue. I installed valid certificate after solved.&nbsp;Actually, I had done it a few times before installing the certificate and this was not a problem, but this time I could only solve it after installing the certificate. Moreover, it did not happen even though I used the noskipcert parameter. Thanks again for your comments.

Regards.

---

<div class="post-metadata">

**Author:** ![leon\_vanzyl](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/leon_vanzyl/32/21759_2.png) [@leon\_vanzyl](https://community.dynatrace.com/u/leon_vanzyl)\
**Post date:** [March 24, 2023, 8:33am UTC](https://community.dynatrace.com/t/dynatrace-operator-cannot-pull-ag-image-connection-denied/36227/14 "2023-03-24T08:33:32Z")

</div>

Hi&nbsp;[@oakdag](https://community.dynatrace.com/user/44945)&nbsp;, can you explain how you “installed” the Cerficate we are facing the same issue when trying to pull the images from a managed cluster&nbsp;x509: “certificate signed by unknown authority”, how did obtain the certificate did you install it using a configMap ?
