# How to pull operator image from private registry?

**URL:** <https://community.dynatrace.com/t/how-to-pull-operator-image-from-private-registry/49412>\
**Category:** Container platforms\
**Tags:** dynatrace-operator, kubernetes\
**Created:** [December 18, 2024, 12:51pm UTC](https://community.dynatrace.com/t/how-to-pull-operator-image-from-private-registry/49412 "2024-12-18T12:51:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhaveshbjoshi](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@bhaveshbjoshi](https://community.dynatrace.com/u/bhaveshbjoshi)\
**Post date:** [December 18, 2024, 12:51pm UTC](https://community.dynatrace.com/t/how-to-pull-operator-image-from-private-registry/49412/1 "2024-12-18T12:51:49Z")

</div>

We have document here which mentions about how to Deploy Dynatrace Operator with images from private registry

> **[Use a private registry](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/guides/container-registries/use-private-registry)**
>
> Use a private registry

But we don’t have an example for manifest.

---

<div class="post-metadata">

**Author:** ![bhaveshbjoshi](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@bhaveshbjoshi](https://community.dynatrace.com/u/bhaveshbjoshi)\
**Post date:** [December 18, 2024, 1:02pm UTC](https://community.dynatrace.com/t/how-to-pull-operator-image-from-private-registry/49412/2 "2024-12-18T13:02:19Z")

</div>

To address the above question, here is the sample from the kubernetes.yaml file which we can use.

1. Navigate to&nbsp;kind: Deployment of&nbsp;dynatrace-operator.

2. Here, we have have two spec sections: Outer **spec**** : **defines high-level deployment properties and Inner** spec ****:** defines the specifications for the individual pods that will be created

- Under the inner spec section of the container we need to add imagePullSecrets as shown below:

```auto
spec:
    imagePullSecrets:
    - name: dynakube
    containers:
      - name: operator

```

3. Similarly we need to add the&nbsp;imagePullSecrets under&nbsp;dynatrace-webhook&nbsp;deployment under the inner spec: section.

```auto
imagePullSecrets: 
      - name: dynakube 
      containers: 
        - name: webhook

```

Please be careful with the indentation. Avoid using tab and use spacebar instead. Also, make sure to change image path to your private registry.

Official kubernetes document for reference: [Pull an Image from a Private Registry | Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret)

---

<div class="post-metadata">

**Author:** ![gopher](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gopher/32/5728_2.png) [@gopher](https://community.dynatrace.com/u/gopher)\
**Post date:** [December 18, 2024, 9:47pm UTC](https://community.dynatrace.com/t/how-to-pull-operator-image-from-private-registry/49412/3 "2024-12-18T21:47:25Z")

</div>

Example Dyntrace CRD’s are located here.&nbsp;  
[dynatrace-operator/assets/samples/dynakube/v1beta2 at main · Dynatrace/dynatrace-operator · GitHub](https://github.com/Dynatrace/dynatrace-operator/tree/main/assets/samples/dynakube/v1beta2)

On a side note:&nbsp;Pull Secrets are only needed if you are using code-modules images (Cloud Native CSI or Application Only).&nbsp;  
Otherwise, if you are using classic Full Stack or Cloud Native Full stack (One Agent) then you don’t need them.

Also if you are using a private repo, make sure that you set the container registry in no-proxy annotation in the crd.

```markup
annotations:
    feature.dynatrace.com/no-proxy: "<your container registry host>"

```
