Dev.to · 2 min read

Keep Docker Engine as Your Kubernetes Runtime on Ubuntu with cri-dockerd

Keep Docker Engine as Your Kubernetes Runtime on Ubuntu with cri-dockerd

Sometimes you genuinely want Docker Engine as the Kubernetes node runtime — a team standardized on the Docker CLI/API for tooling, an image-build box that doubles as a node, or a legacy playbook you can't rewrite yet. Since dockershim was removed in Kubernetes 1.24, that path now runs through cri-dockerd, an open-source CRI adapter maintained by Mirantis. Here's how to set it up on Ubuntu, and an honest note on whether you should. Should you? A quick reality check For most people the answer is no — use containerd (see the previous post). Reach for cri-dockerd only when you have a concrete reason: Existing automation that talks to the Docker socket on the node. You want docker build and the kubelet on the same host sharing one image store. A vendor or product that still assumes Docker Engine as the runtime. If none of those apply, containerd is less to install and less to break. 1. Install Docker Engine on Ubuntu Use Docker's official repo, not the docker.io package, so you get current Engine: sudo apt-get update sudo apt-get install -y ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" \ | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io Set Docker's cgroup driver to systemd — on Ubuntu's cgroup v2 this must match the kubelet or the node will not stay Ready: sudo mkdir -p /etc/docker cat

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More Startup & VC News