Changing Your Container Registry

Datadog publishes container images in Google’s gcr.io, AWS’ ECR, and on Docker Hub:

dockerhub.iogcr.iopublic.ecr.aws
datadog/agentgcr.io/datadoghq/agentpublic.ecr.aws/datadog/agent
datadog/cluster-agentgcr.io/datadoghq/cluster-agentpublic.ecr.aws/datadog/cluster-agent
datadog/operatorgcr.io/datadoghq/operatorpublic.ecr.aws/datadog/operator
datadog/dogstatsdgcr.io/datadoghq/dogstatsdpublic.ecr.aws/datadog/dogstatsd
datadog/synthetics-private-location-workergcr.io/datadoghq/synthetics-private-location-workerpublic.ecr.aws/datadog/synthetics-private-location-worker

Pulling from the GCR or ECR registry works the same (except for Notary) as pulling from Docker Hub. You can use the same command (with different parameters) and get the same image.

Note: ECR and GCR do not support Notary. If you are verifying the signature of images pulled from Docker, this feature does not work on GCR or ECR.

To update your registry, you need to update your registry values based on the type of container environment you are deploying on.

Note: You can also use a private registry, but you will need to create a pull secret to be able the pull the images from the private registry. For more information about creating a pull secret, see the Kubernetes documentation.

Docker

Updating your registry

To update your containers registry, run the pull command for the new registry. To see the Docker pull commands for different container registries, see the examples in the Overview of the Docker docs page.

Kubernetes with Helm chart

To update your containers registry while deploying the Datadog Agent (or Datadog Cluster Agent) with the Datadog helm chart on Kubernetes (including GKE, EKS, AKS, and OpenShift) update the values.yaml to specify a different registry:

Datadog Helm chart >= v2.7.0

  1. Update your values.yaml:
    registry: gcr.io/datadoghq
    
  2. Remove any overrides for agents.image.repository, clusterAgent.image.repository, or clusterChecksRunner.image.repository in the values.yaml.

Datadog Helm chart < v2.7.0

Change the repository to gcr.io:

agents:
  image:
    repository: gcr.io/datadoghq/agent

clusterAgent:
  image:
    repository: gcr.io/datadoghq/cluster-agent

clusterChecksRunner:
  image:
    repository: gcr.io/datadoghq/agent

For more information about using the Datadog Helm chart, see the Datadog Kubernetes documentation and the example values.yaml file.

If using a private registry, you will need to add a pull secret to the [key].image.pullSecrets field to each image.

agents:
  image:
    pullSecrets:
      - name: PrivateRegistrySecret

clusterAgent:
  image:
    pullSecrets:
    - name: PrivateRegistrySecret

clusterChecksRunner:
  image:
    pullSecrets:
    - name: PrivateRegistrySecret

Kubernetes with the Datadog Operator

To update your registry while deploying the Datadog Agent (or Datadog Cluster Agent) with the Datadog Operator:

  1. Update the Datadog Agent manifest file to override the default registry (gcr.io/datadoghq). For example, with public.ecr.aws/datadog:
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  global:
    registry: gcr.io/datadoghq
  // ..
  1. Remove any overrides for the spec.override.nodeAgent.image.name, spec.override.clusterAgent.image.name, and spec.override.clusterChecksRunner.image.name fields.
  2. If using a private registry, you will need to add a pull secret to the [key].image.pullSecrets field to each image.
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  override:
    nodeAgent:
      image:
        pullSecrets:
          - name: PrivateRegistrySecret
    clusterAgent:
      image:
        pullSecrets:
          - name: PrivateRegistrySecret
    clusterChecksRunner:
      image:
        pullSecrets:
          - name: PrivateRegistrySecret
  // ..

For more information about the Datadog Operator, see Deploying an Agent with the Operator.

Using the public.ecr.aws/datadog registry with Helm

You could also switch from the default gcr.io/datadoghq registry to the public.ecr.aws/datadog registry when installing the Operator with the Helm chart. To switch to the public.ecr.aws/datadog registry:

Update values.yaml with the new image:

image:
  repository: public.ecr.aws/datadog

ECS

To update your registry while deploying on ECS, in the datadog-agent-ecs.json file, change the value of the "image" key under containerDefinitions to "public.ecr.aws/datadog/agent:latest":

"image": "public.ecr.aws/datadog/agent:latest",

For more information about deploying Datadog on ECS, see the Datadog ECS documentation and the example datadog-agent-ecs.json file.

Fargate

To update your registry while deploying on Fargate, update the image in the Fargate task definition to use public.ecr.aws:

"image": "public.ecr.aws/datadog/agent:latest"

The next time the task starts, it pulls from public.ecr.aws instead of Docker Hub. For more information about deploying on Fargate, see Deploying the Agent on ECS and Deploying the Agent on EKS.

Cluster Agent

If you’re using the Helm chart to deploy the Datadog Agent and the Datadog Cluster Agent, follow the instructions in Kubernetes with Helm chart, and no other updates are needed. The change to the Helm values.yaml outlined above changes the repository that both the Cluster Agent and the Datadog Agent are pulled from.

If you’re using the Datadog Operator to deploy the Datadog Cluster Agent, follow the instructions in Kubernetes with the Datadog Operator, and no other updates are needed. The instructions for updating the Operator configuration updates the repository that both the Cluster Agent and the Datadog Agent are pulled from.

For more information about the Datadog Cluster Agent, see the Cluster Agent docs, and the setup docs.

Kubernetes Helm for the Datadog Private Location worker

To update your registry for the Private Location worker, update the datadog/synthetics-private-location-worker image to the public.ecr.aws/datadog/synthetics-private-location-worker or gcr.io/datadoghq/synthetics-private-location-worker images.

To change the default repository (gcr.io/datadoghq), update the values.yaml with the new image:

image:
  repository: gcr.io/datadoghq/synthetics-private-location-worker
PREVIEWING: may/unit-testing