vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

Add container definition for k3d cluster

Open kforeverisback opened this issue 3 years ago • 0 comments

Purpose

Create a container definition which provisions a local kubernetes cluster with k3d (for Codespaces and Remote - Containers).

Motivation

While we have a container definition to provision a k8s cluster with Minikube. k3d with k3s kubernetes distribution has several advantages over minikube for provisioning a local cluster:

  • Faster cluster provision turnaround (create <--> delete).
    • With k3d, cluster creation and deletion are super-fast (under a minute).
    • Minikube takes couple of minutes to create or delete a cluster
  • Faster inner-loop k8s cluster ready for use
  • Lightweight, uses less memory and smaller binary size.
  • It has built-in
    • Ingress Controller (traefik)
    • Replication Controller
    • Service Load Balancer
    • Can use existing docker network, docker registry as its internal registry
    • Local path provisioner
    • NodePort/Load-Balancer port forwarding
  • See k3s page and k3d page for more features
  • Examples of k3d as inner-loop k8s cluster: cse-labs/kubernetes-in-codespaces and cse-labs/istio-rust-webassembly-labs

Relates to: Both: Codespaces and Remote - Containers

kforeverisback avatar May 17 '22 22:05 kforeverisback