Currently we are using dind(we are not mounting docker.sock from host) on kuberenetes to build container images and also to run containers inside container for running unit tests. With Dockershim deprecation in Kubernetes, I am trying to analyze whether dind will still work on kubernetes without dockershim and with containerd runtime.
I tried running dind pod on gcp and aws eks with containerd container runtime with kubernetes 1.21 release. It worked without any issue in privileged mode. But I am confused how it can even work as dind is docker in docker and not docker in containerd. I did some research, but still cannot figure out how this works and whether it will work with kubernetes 1.24 release. Can someone help?
I used below spec for testing on kubernetes with containerd runtime
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: dind
name: dind
spec:
containers:
- image: docker:20.10.12-dind
name: dind
ports:
- containerPort: 2375
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: ''
- name: client
image: ubuntu:latest
command:
- sleep
- infinity
env:
- name: DOCKER_HOST
value: tcp://localhost:2375