Minikube quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows
minikube.sigs.k8s.io
minikube.sigs.k8s.io
Kind is very clearly ephemeral, and it starts up quickly enough that it’s not annoying to deal with frequent restarts while developing setup scripts.
Minikube does try to be more “correct”, so it’s possibly better strictly for learning kubernetes or hacking on k8s itself.
Rancher Desktop is fully Apache 2 licensed, so I think that shouldn't be an issue — even if it somehow ends up closed source at one point, at worst somebody can start a fork from the last public release and go from there.
Our release process for Windows & Linux literally involves pulling the build from GitHub, attaching signatures on top, and pushing the bits back up. (There's some QA in the middle, but that doesn't change the bits.) The only reason we don't do that for Mac is because we haven't sorted out the signing there using this flow.
Note that Docker Desktop wasn't open source (but the core Docker engine was), which is why they can start charging money for the binaries and not worry about somebody making a fork.
Having said that — feel free to continue using kubectl to do everything; whatever floats your boat is good :)
My options on this physical machine as I see it are: lima, rancher desktop, or Docker Desktop itself. I don't actually use Rancher Desktop for its Kubernetes integration, and in earlier versions it wasn't even possible to do this without weird vague workarounds, but now it has an "Off" switch, and I use it for the rare occasion that I need to run container images locally, or a kind cluster.
I ruled out Docker Desktop because I can't use it alongside of other VMs (not because it doesn't work, which I understood to be true for Windows users, but because it is composed of a virtual machine, with a memory footprint, and one shouldn't have too many of those unless you have a beast of a laptop...) and because it requires paid volume licensing. Don't get me wrong, I like to pay for things, but I also like to evaluate alternatives!
I used this for a while: https://github.com/lima-vm/lima/blob/master/examples/k8s.yam...
It wasn't quite perfectly stable, also not maintained by the Kubernetes core team but externally, so it has to play catch-up a bit when releases are done, rather than in the case of KinD it can enjoy a release on the schedule with Kubernetes.
I am a kubeadm baseline user and I find that Kind is actually the best way to do experiments (I don't use MiniKube at all so can't compare) Some experiments require a bit more control of the VM that runs your CRI and for those there are raw nodes (physical machines) or a Lima VM for a convincing approximation of one.
When there's a need to go to production, I'm generally not using any of these choices, but I am using KinD quite extensively (even on remote nodes!) through tailscale. This is actually really nice.
Are you using Docker Desktop? (Do you pay?) That is the benefit and that's literally all I use Rancher Desktop for. A Docker Desktop replacement. It also works with KinD, that was my whole point. Since one might assume it doesn't work (or maybe they tried in the past and found it didn't work at some point in the past) – today it works great.
If you have another alternative to suggest how you can run KinD on MacOS, I'm all ears. I'm literally using a full stack open source approach, to pay a gatekeeper in order to access it from my MacOS workstation seems like an anti-thesis to me.
Started using it for container management, and have been pleased.
After a while, I really found it limiting. Especially when I wanted to get into the internals of K8s. I then started to spin up VMs in VirtualBox and deployed bare metal K8s using Ansible and tutorials like this - https://www.tecmint.com/install-kubernetes-cluster-on-centos...
Creating a 2 node cluster was super helpful to understand how K8s worked. I was able to get onto the nodes themselves and see what was going on. It was an amazing journey.
Adding MetalLB to the mix really was the cherry on top. Allowed me to play around with ingress controllers.
So while I really do appreciate Minikube for what it is, it just doesn't go the distance when you want to dig in deep.
Really I just want an easy to configure load balancer and an easy way to configure subdomains and let's encrypt. That's always been weirdly the most annoying part of dealing with k8s for me. I found it pretty hard to mess around with traefik...
[1] https://formulae.brew.sh/formula/minikube [2] https://minikube.sigs.k8s.io/docs/start/
As an added benefit, unlike apt, you don't need root to install (most) brew packages.
It seems like it’s made for Debian based systems, much like the AUR for Arch.
I believe it came about to cater to Mac developers that don't want to bother with Linux based package managers, this becomes an easy out, but as mentioned previously, is more of an afterthought.
I don't understand what point you tried to make. If what you want is a stable install to avoid breaking changes pushed in unstable releases, why not stick with a working install just like what you get with brew?
I don't see how using exotic non-standard package managers make releases more stable.
Depending on your perspective, this is either horrifying and annoying or the best thing since sliced bread.
The installation steps for Kubernetes and the rest of the ecosystem like minikube and helm are all essentially `wget install.sh | sh`. What am I missing? How do people do this in production environments?
Some major Linux distros do ship with official k8s packages. For instance, Ubuntu even dedicates an article on how to deploy multiple k8s choices.
And it is declarative. Try it, and you will never look back
Gives you a fairly slick "hot reload" experience in k8s (minikube-created or not).
For a less cheeky answer, I'm currently using skaffold but I'm not in love with it. It does the job but has some rough edges
There's a bunch of semi-opinionated tools like Skaffold: Garden, Tilt (just bought by Docker), Docker Compose, and of course, the trusty ol' shell script powered by kustomize.
We wrote Telepresence because we found that everyone has their own snowflake-ish workflow once you get beyond the base case of "build container, kubectl apply", so we decided to focus just on the inner dev loop, and then integrate with your preferred workflow. YMMV.
Glad to hear Skaffold & Cloud Code are working well for you.
I wanted to note for others that there is a Cloud Code JetBrains plugin that also adds a workflow based on Skaffold to IDEs such as IntelliJ, PyCharm, etc. as well. Just like the Skaffold and the VS Code plugin, it also works with any K8s cluster.
Documentation: https://cloud.google.com/code/docs/intellij JetBrains Marketplace listing: https://plugins.jetbrains.com/plugin/8079-cloud-code
If you're using k3s and containerd for the container runtime, you can build the image with docker and then load it directly to the place containerd expects it to be stored. Then if the pod's imagePullPolicy is IfNotPresent, simply deleting/restarting the pod will be enough to get your new code running.
The magic incantation is:
docker save the-image-name:latest | sudo ctr -a /var/run/k3s/containerd/containerd.sock -n k8s.io image import -
But for front end development where auto-reload is super useful, I don't use containers at all. Just expose whatever services you need outside the cluster using NodePort or host mode networking.
As others have mentioned, there are many great solutions in the market for Kubernetes local iterative development. If you do decide to give Skaffold a try, I recommend checking out the File Sync feature (https://skaffold.dev/docs/pipeline-stages/filesync/) which enables you to continue making changes during a Skaffold iterative development session and have that code synced over to your running Kubernetes instance without having to rebuild or push images. When using Jib or Buildpacks to containerize your application, File Sync just works for Go, NodeJS, and Java but requires a little configuration for Dockerfiles.
FWIW, Skaffold is under active development and we're continuing to expand support for iterative development, CI and CD use cases as well as simplifying configs and general ease of use.
We also have a bunch of ways you can reach out to the team (https://skaffold.dev/docs/resources/) if you have any questions. We'd be happy to hear from you.
K3s and K0s both operate with control plane components not running in containers. Again, when learning how Kubernetes functions, hiding these control plane components can be counterproductive. However, this also means K0s and K3s require fewer resources than the others, giving you more room to run workloads. Additionally, K3s now supports multi-node clusters and multiple options for etcd, including several options that allow for an HA control plane.
Personally, I am a big fan of Rancher Desktop (K3s under the covers), and on my M1 Mac I find Docker to be the most complete and easiest to use. Docker Desktop is for-pay except for small companies and for open-source projects.
I cannot believe that folks think k8s is a good thing.
If you are ever in a position to do professional work on web apps, you'll quickly learn why container orchestration systems are invaluable.
All my stuff runs on one very flexible, easy to maintain k8s cluster.
App deployment is super easy.
It feels already much better and saver than all the snow flake systems i build before..
If you don't get it, you should really try it out before having a battle with 'the pointy-haired ones' whatever you are referencing here.
I run a big k8s cluster at work (200-400 nodes), a private single node one and for a startup with 2 nodes.
I learned with MicroK8s on a Pi cluster and it was super painful and complex to get it all working, I found myself troubleshooting obscure logs and having to delete and recreate the cluster many times. But once I got it all working it was exactly the pain I needed to prepare myself for working on a production k8s cluster.
Personally, I work in an open-plan office. I have lots of Zoom meetings, which I have to do in separate conference rooms, and require having my computer with me.
This week I've been at a conference, and I had my laptop with me to get some work done while half-listening to presentations and panels. I also work from home, of course.
Also, sometimes I sit in a coffee shop to work.
I also sometimes travel to get a change of scenery, and work remotely with my laptop.
Also, I sometimes bring my laptop on vacations if there's any chance that I have to attend to an emergency.
If I only had a stationary machine, none of the above would be possible.
Of course, my MacBook is a "proper PC". When I'm at a real desk, I can plug it into an external monitor and have the full stationary experience.
Could I have a "real" stationary Mac for desk work, and a separate laptop for mobility? Sure, but that sounds like a huge pain, as I'd have to keep everything in sync.
I think kind wins the simplest but microk8s might be a close second
https://ubuntu.com/tutorials/install-a-local-kubernetes-with...
If part of your objective is to learn how to build a k8s cluster then I’d recommend building it with kubeadm. If you just want to get something working, k3s or microk8s could fulfill your needs.
Consul + Nomad makes for an excellent home lab setup, using docker, podman, raw binaries, etc, as you observe. It strongly recommends 3-node cluster, but works fine on a single host if you don't need the distributed / HA aspect. We've been running it in production at work for a couple of years and it's been rock solid.
The big problem with Nomad is that it's not as popular as k8s -- so while you can leverage docker hub, there's fewer oven-ready packs for more complex systems, eg cortex metrics or mimir, as current challenges for us.
Hashicorp is building up a public repository [1] which is great to see, but it's a long way from having the same scope as the collected repositories of helm charts.
[1] https://github.com/hashicorp/nomad-pack-community-registry
Between CNI, Consul Connect, and Traefik, we have hit some stumbling blocks, but nothing we can't do, yet.
As to dynamic load, yeah, we've mostly been using Nomad for HA -- are there some surprises in store when we start playing with the autoscaler?
Best to just bite the bullet and install kubernetes itself I think. Currently I'm at the point of figuring out how to customize a Fedora CoreOS image to boot from PXE or USB and auto-install itself on bare metal with kubernetes already installed in the image.
The current environment for that is a Fedora Server install on one of those old PCs with enough environment manually bootstrapped to have the tools to customize Fedora CoreOS in a VM.
These days, I use hosted Kubernetes (via Google Kubernetes Engine), which means my poor laptop isn't burdened by any of this stuff. It's great; I can just create a namespace and load it up with whatever I want to run, and the cluster will automatically provision everything. I have to be online, but I've been been in a situation where this has been a problem.
GCP also has some powerful features you can't get locally, like load balancers, automatic DNS provisioning, automatic TLS cert provisioning, virtually unlimited CPU/RAM/disk, and so on. Another added benefit of this approach is that it's trivial to give shared, public access to everything. Sharing a process with colleagues is also easy.
Using Google's Kubernetes is particularly smooth because the cluster is set up with GCP's "autopilot" mode, which is basically a smarter control plane; it's preconfigured to dynamically scale the cluster according to the workload, including CPU/memory requests. Need to run a pod with 16 dedicated cores and 32GB RAM in order to do some temporary stress testing, for example? Just declare that in the "requests" part of the pod resource, and you'll have a dedicated node in a minute or two.
Admittedly I don't run a "live" develop-compile-run-debug cycle of any application this way. Maybe it's possible, but I haven't researched how. Personally, when I want to develop on a single app, I just run the code locally, and set it up to connect to the test cluster using a VPN.
I currently use a collection of docker-compose files, but am toying with the idea of switching it out for k8s
https://github.com/kubernetes/minikube/issues/13968
I'm really at a loss as to how to troubleshoot this as I'm still learning how to use Kubernetes.
Also ofc typo S->D for Docker
Here's a link [0] to the Minikube documentation for this use case.
[0] https://minikube.sigs.k8s.io/docs/tutorials/docker_desktop_r...
The problem with minikube if you have low resource system. It would definitely headache if you run any heavy Workloads.
Talking of something, which idempotently installs minikube if necessary, pulls images from the remote registry, sets up the network with DNS... Is there such a tool?
What happened? Was active maintenance on Minikube resumed?
A lot of ppl decided to ditch it due to that.
If you have anything with a 'real' cpu from the last 5 years, this problem is not going to exist for you
https://developers.redhat.com/products/openshift-local/overv...
eval $(minikube docker-env)EDIT: we're talking dev environments only. Not prod. DO NOT put minikube in prod.
I'm watching this happen in real time at the current gig. I brought up my concerns to the senior in charge of this. He's doing it anyway.
Let you know how that goes.
Docker made sense to use in production because people wanted to run containers.
What could possibly be the justification for running production workloads on minikube?