Replies: 1 comment
-
|
Shouldn't the plugin rather be called k3s? It is expected to run |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
The
k8splugin adds Kubernetes development cluster support to thecontainerCLI. Cluster nodes run k3s, a lightweight Kubernetes distribution, packaged as a container image that runs directly on the Apple container runtime.This is an experimental feature. The goal is to make spinning up a local Kubernetes cluster fast and simple.
Proposed UX
Intial feature set -
run,create,delete,loadImage,write-config,listThe initial feature set covers the core day-to-day workflow: boot a single-node cluster, load images into it, point
kubectlat it, and tear it down when finished.k3s base image — Before any cluster can start the plugin needs a k3s node image.
runandcreatecheck for the image on first use and build it automatically if it is missing. The image layersrancher/k3swith a custom entrypoint that handles Apple-kernel specifics: native containerd snapshotter, cgroup v2 setup, and the sysctl values required for Kubernetes networking.run / create / delete —
runcreates and starts a single control-plane cluster in one step and writes a kubeconfig entry to~/.kube/configautomatically.createcreates the container without starting it.deletestops and removes the cluster and cleans up its entries from~/.kube/config.load-image — Loads a locally-stored image into the cluster's containerd so kubelet can schedule pods using it without an external registry. The image is saved from the
containerimage store to a temporary OCI tar and streamed into the node viactr images import. Short references (alpine) are automatically qualified todocker.io/library/alpine:latest.write-config / get-kubeconfig —
write-configmerges the cluster's kubeconfig into~/.kube/configand setscurrent-context.get-kubeconfigprints the YAML to stdout for scripts or manual merging. Both rewrite the API server address to127.0.0.1:<host-port>or to the machine's FQDN when one is detected.list — Lists all clusters and their nodes in a table, discovered via the
plugin=k8scontainer label.Proposed Architecture
Future Work
API Support - all cluster topology requests will map to a well defined configuration object
Multi-node clusters —
runwill accept a--workers Nflag to start N worker nodes alongside the control plane. Each worker runs k3s in agent mode and joins using a token fetched from the control plane.load-imagewill target all nodes by default so every kubelet can schedule pods regardless of placement.Load balancing — Allow clusters to expose services through a host-accessible endpoint without manual port-forwarding. k3s ships with ServiceLB; the integration point will be designed to map cleanly to the
containernetworking model.Registries — Let users point a cluster at a local registry (e.g. one started with
container run) so that images pushed there are immediately pullable inside the cluster without runningload-imagemanually. This maps to the k3sregistries.yamlmirror configuration.Questions for the Community
We'd love your feedback:
Please share your thoughts and feedback/suggestions. We want to hear from you!
Beta Was this translation helpful? Give feedback.
All reactions