Docker Deprecation in Kubernetes

Docker Deprecation in Kubernetes

Kubernetes is deprecating Docker as a runtime starting after version 1.20, and some cloud providers have deprecated Docker in their images.

If you are running a version of Kubernetes where Docker has been deprecated, the Docker socket is no longer present, or has no information about the containers running by Kubernetes, and the Docker check does not work. You can find details about Docker runtime on kubernetes.io. This means that you must enable either the containerd or the CRI-O check depending on the container runtime you are using. The container metrics collected from the new container runtime replace the Docker metrics.

With version 7.27+ of the Datadog Agent, the Agent automatically detects the environment you are running, and you do not need to make any configuration changes.

If you are using Agent < v7.27, you must specify your container runtime socket path:

Note: You may need to update your existing monitors, dashboards, and SLOs because metrics names change—for example, from docker.* to containerd.*.

Set the path to your container runtime socket with the datadog.criSocketPath parameter in the Helm chart.

For example:

criSocketPath:  /var/run/containerd/containerd.sock

Remove any references to the Docker socket, as well as any Docker socket volume mounts.

Use the environment variable DD_CRI_SOCKET_PATH to point to your container runtime socket path. Set on all Agent containers if using dedicated containers:

env:
  - name: DD_CRI_SOCKET_PATH
    value: /var/run/containerd/containerd.sock

Mount the socket from your host to the Agent container:

volumeMounts:
  - name: containerdsocket
    mountPath: /var/run/containerd/containerd.sock
  - mountPath: /host/var/run
    name: var-run
    readOnly: true
volumes:
  - hostPath:
      path: /var/run/containerd/containerd.sock
    name: containerdsocket
  - hostPath:
      path: /var/run
    name: var-run