# ECK using Docker for Operator Container Registry docker.instead of elastic.co

**URL:** <https://discuss.elastic.co/t/eck-using-docker-for-operator-container-registry-docker-instead-of-elastic-co/287842>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Tags:** docker\
**Created:** [October 27, 2021, 5:52pm UTC](https://discuss.elastic.co/t/eck-using-docker-for-operator-container-registry-docker-instead-of-elastic-co/287842 "2021-10-27T17:52:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cj11](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cj11/32/96414_2.png) [@cj11](https://discuss.elastic.co/u/cj11)\
**Post date:** [October 27, 2021, 5:52pm UTC](https://discuss.elastic.co/t/eck-using-docker-for-operator-container-registry-docker-instead-of-elastic-co/287842/1 "2021-10-27T17:52:49Z")

</div>

I'm using the ECK Stack as described in [this tutorial - Deploy an Elasticsearch cluster | Elastic Cloud on Kubernetes [1.8]](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html) for a basic ECK setup.

I want to change the container registry for operator to use the docker hub container registry. The [Operator Config](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-operator-config.html) has a `container-registry` option to set it to a custom registry like `docker.io` instead of `docker.elastic.co`

My example `ConfigMap.yaml` for the custom `container-registry`

```auto
---

# Source: eck-operator/templates/configmap.yaml

apiVersion: v1

kind: ConfigMap

metadata:

  name: elastic-operator

  namespace: elastic-system

  labels:

    control-plane: elastic-operator

    app.kubernetes.io/version: "1.8.0"

data:

  eck.yaml: |-

    log-verbosity: 0

    metrics-port: 0

    container-registry: docker.io

    max-concurrent-reconciles: 3

    ca-cert-validity: 8760h

    ca-cert-rotate-before: 24h

    cert-validity: 8760h

    cert-rotate-before: 24h

    set-default-security-context: true

    kube-client-timeout: 60s

    elasticsearch-client-timeout: 180s

    disable-telemetry: false

    validate-storage-class: true

    enable-webhook: true

    webhook-name: elastic-webhook.k8s.elastic.co

---

```

But when pulling the docker image from [docker.io](http://docker.io), it cannot

```auto
Failed to pull image "docker.io/elasticsearch/elasticsearch:7.14.2": rpc error: code = Unknown desc = Error response from daemon

```

The issue is with using the dockerhub registery is that the `elasticsearch` image is an official image and doesn't need to be namespaced like this `elasticsearch/elasticsearch`

Has anyone encountered this?

---

<div class="post-metadata">

**Author:** ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)\
**Post date:** [October 28, 2021, 12:25am UTC](https://discuss.elastic.co/t/eck-using-docker-for-operator-container-registry-docker-instead-of-elastic-co/287842/2 "2021-10-28T00:25:21Z")

</div>

U can change the image for the ECK resources. So for the `kind: Elasticsearch`, just set `image: elasticsearch:<version>`. See [Create custom images | Elastic Cloud on Kubernetes [1.8] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-custom-images.html)

---

<div class="post-metadata">

**Author:** ![cj11](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cj11/32/96414_2.png) [@cj11](https://discuss.elastic.co/u/cj11)\
**Post date:** [November 4, 2021, 4:33pm UTC](https://discuss.elastic.co/t/eck-using-docker-for-operator-container-registry-docker-instead-of-elastic-co/287842/3 "2021-11-04T16:33:34Z")

</div>

Thanks! That worked!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 2, 2021, 4:34pm UTC](https://discuss.elastic.co/t/eck-using-docker-for-operator-container-registry-docker-instead-of-elastic-co/287842/4 "2021-12-02T16:34:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
