Replies: 6 comments 9 replies
|
Shouldn't the plugin rather be called k3s? It is expected to run |
|
I'd love to be able to install Cilium in these clusters. that would require some additional kernel configs to be enabled, which are documented here |
|
Registries don't need to be implemented immediately but it's worth giving a little thought to them and how they might interact with the cluster feature. I'd like to see the default My assumption that the most common use case is local cloud native development, where having a local registry makes it so that the developer can use the same build-tag-push method for making images available, and so that they don't have to vary The tool has the If With the convenience wrapper around registries in place, there are a few different ways to connect clusters and registries. Most opinionated would be that by default, I've implemented this pattern in similar tools and it tends to be useful for most users, but it requires options for "don't do anything about a registry" or "use this registry" if you need to escape the built-in opinionation. Less opinionated would be that by default, |
|
why not use the kubeclient library? https://github.com/swiftkube/client |
|
Hello folks! First: let me express my genuine gratitude for this work. My work involves Kubernetes application development, with a healthy dose of Rosetta emulation, so I am also pleased to see the k8s support shaping up. I've already moved from Minikube to Docker Desktop for k8s, and would be happy to move to this as it matures. Now, that said, I actually saw the apple/container k8s work after I had discovered a very promising alternative, Kiac. I hope the author @saiyam1814 will forgive me for tagging him here: it's a tremendous piece of work already, even in its early stage. It offers a more complete feature set and a smooth experience. This post by the author offers a fuller discussion of what it offers: https://blog.kubesimplify.com/introducing-kiac-kubernetes-in-apple-containers Given the timelines for both projects I strongly suspect this is a case of independent development by two people with the same great idea. But I think it would be wise for the authors here to take a look at Kiac and consider whether it's worth either throwing some weight behind that project instead, or finding another way to collaborate closely with Kiac. I asked Claude to compare the two repos with the following in mind—what aspects of the future work discussed here are already shipping in kiac. Here's what it found for me:
An argument could be made that there is value in separating the two projects cleanly: let In any case — thank you again, and to @saiyam1814 as well! |
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!
All reactions