Migrating telemetry and security agents from dockershim

    There are a few ways agents may run on Kubernetes cluster. Agents may run on nodes directly or as DaemonSets.

    Historically, Kubernetes was built on top of Docker. Kubernetes is managing networking and scheduling, Docker was placing and operating containers on a node. So you can get scheduling-related metadata like a pod name from Kubernetes and containers state information from Docker. Over time more runtimes were created to manage containers. Also there are projects and Kubernetes features that generalize container status information extraction across many runtimes.

    If a pod wants to make calls to the running on the node, the pod must either:

    • mount the specific path of the Docker daemon’s privileged socket directly, also as a volume.

    For example: on COS images, Docker exposes its Unix domain socket at /var/run/docker.sock This means that the pod spec will include a volume mount of /var/run/docker.sock.

    Note: There are alternative ways for a pod to access Docker on the host. For instance, the parent directory /var/run may be mounted instead of the full path (like in this example). The script above only detects the most common uses.

    In case your cluster nodes are customized and install additional security and telemetry agents on the node, make sure to check with the vendor of the agent whether it has dependency on Docker.