Neil Cresswell and Steven Kang from Portainer discuss K2D, a project merging Kubernetes tooling with Docker to manage containers on edge devices. They delve into the architecture, motivations, and limitations of K2D, highlighting its efficiency and compatibility with small devices like Raspberry Pis. The podcast explores running Kubernetes tools on Docker without a full Kubernetes distribution and the future possibilities of lightweight container configurations.
K2D project enables managing Docker containers on small devices using Kubernetes tools efficiently.
K2D offers minimal resource usage, crucial for small devices, with future plans to enhance functionalities and integrations.
Deep dives
Introduction of K2D: A Kubernetes to Docker Translation Project
Neil Creswell, CEO of Portainer, introduces the K2D project, which stands for Kubernetes to Docker, a concept creating a partial Kubernetes API on top of a Docker engine. Targeted at small devices like older Raspberry Pis, 32-bit machines, and edge infrastructure, K2D allows using Kubernetes tools to deploy containers on a Docker engine with minimal resource usage compared to traditional Kubernetes distributions.
Efficiency of K2D for Resource-Constrained Environments
K2D offers significant resource efficiency, consuming only 20MB of memory for a single node setup, compared to the 450-700MB required by other lightweight Kubernetes distributions like K3S. This efficiency is crucial for small devices with limited resources such as automation systems and industrial sensors, preventing excessive memory usage and potential hardware damage.
Architecture and Functionality of K2D
K2D comprises three main components: API, controller, and data. The API functions similarly to a Kubernetes API server, handling Kubernetes requests and supporting a subset of Kubernetes resources. The controller manages the sequence of operations to ensure correct ordering, while the converter component translates Kubernetes objects to compatible Docker API instructions for execution on the Docker engine.
Future Roadmap and Enhancements of K2D
Future plans for K2D include supporting container D for even more lightweight operations, exposing metrics and observability features, and adding advanced functionalities like IPv6 support, job simulation, and ingress services. Along with metrics and observability improvements, potential integrations with tools like Helm are anticipated to enhance the user experience and adaptability of K2D in diverse environments.
Bret and Nirmal are joined by Neil Cresswell and Steven Kang from Portainer to look at K2D, a new project that enables us to leverage Kubernetes tooling to manage Docker containers on tiny devices at the far edge.
K2D stands for Kubernetes to Docker, which is a bit of a crazy idea -- it's a partial Kubernetes API running on top of Docker Engine without needing a full Kubernetes control plane. If you work with very small devices, including older Raspberry PIs, 32-bit machines, maybe industry sensors and the infrastructure we now call 'edge', the container hardware is often hard for you to make simple, reliable, and automated all at the same time.
So this project uses less resources than a single node K3S and still allows you to use Kubernetes tools to deploy and manage your containers, which are in fact just running on a Docker Engine with no full-fledged Kubernetes distribution going on there.
We get into far more detail on the architecture, the Portainer team's motivations for this new open source project and what its limitations are, because it's not real Kubernetes, so it can't do everything.