11 ms·
Minikube quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows
- jdoliner 4y agoI used minikube for a long time, it's pretty good but I found kind to be a lot nicer of an experience and eventually switched. https://kind.sigs.k8s.io/ https://kind.sigs.k8s.io/
- spockz 4y agoI can second this. Kind seems so much nicer. With minikube I was somehow constantly messing with virtualisation frameworks. Kind just works.
- thinkmassive 4y agoAgree, Minikibe occupies a strange middle ground of being ephemeral but heavyweight. It’s slow enough to make it seem worth maintaining the same cluster over time, but that was a bad approach when I tried it. 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.
- qbasic_forever 4y agoI just wish kind had a similar addon ecosystem as minikube. I'm sure if it gets popular enough then it will spawn stuff like that too though. The one thing that keeps me using minikube is the ease of spinning up an ingress, internal registry, etc. that usually just works.
- outime 4y agoYep, kind is IMHO the way to go for most of the use cases. Really fast to set up new clusters and low resource consumption due to its nature.
- snapdaddy 4y agoHave you tried using k3s? How do the two compare?
- nimbius 4y agonot a bad tool but you get ~90% of the same functionality with podman, it doesnt need to run as root, and it supports user scoped service definitions and control in systemd.
- thinkmassive 4y agoYou can use kind with podman, and also rootless https://kind.sigs.k8s.io/docs/user/rootless/ https://kind.sigs.k8s.io/docs/user/rootless/
- pitacracker 4y agoYou’re comparing apples and oranges.
- raesene9 4y agoI'm a huge fan of KinD for development and testing clusters. It's also relatively easy to customize cluster configuration or node image, so you can create clusters for custom scenarios.
- mc4ndr3 4y agominikube is the best kept secret in the container industry. Use minikube to match closer to prod on your local development machine.
- gofreddygo 4y agoYes and being decoupled from Docker Machine is super underestimated in the community IMHO. I switched seamlessly between VirtualBox based and Docker Machine based clusters in no time when Docker went rogue with their licensing. EDIT: we're talking dev environments only. Not prod. DO NOT put minikube in prod.
- dvtrn 4y agoDO 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.
- solarkraft 4y agoWhat are the concerns? I keep hearing the same "don't use it in prod" about docker, yet I know quite a few (small-ish) operations successfully running on it.
- deepsun 4y agoHm, never heard against Docker in cloud (since early times of Docker). Only about keeping your database in Docker -- yes, that was arecommentadion some 5+ years ago and maybe now as well.
- thinkmassive 4y agoMinikube isn’t intended to run production services. You’ll encounter a lot of constraints that don’t exist on a real cluster, and you’ll likely lose important data if you use it very long. 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?
- semitones 4y agoWe use minikube for local development, very useful.
- _verandaguy 4y agoI'm not particularly involved with Kubernetes, but last I heard (about 2 years ago), Minikube was on the way out (because it was going into maintenance mode or something like that), and Rancher's k3s was taking the mantle of "tiny local Kubernetes server." What happened? Was active maintenance on Minikube resumed?
- pojzon 4y agoK3s started being super inefficient. Using up to 20% of cpu for idle cluster. A lot of ppl decided to ditch it due to that.
- skrtskrt 4y agoIt's peaking at 8% CPU time on my 1-shared-vCPU digital ocean droplet, spending most of its time below about 3% - I can't imagine any modern laptop would blink at that usage.
- pojzon 4y agoSearch for Rasbian github issues. Raspberry community was and is a big share in kubernetes lightwaight installations.
- ClumsyPilot 4y agoKeep in mind that Pi is like an intel atom in performance,and an old one to boot. If you have anything with a 'real' cpu from the last 5 years, this problem is not going to exist for you
- encryptluks2 4y agoWhere did you hear that? Minikube never ceases development.
- baq 4y agoas someone late to the party, what's the local development auto-reload, auto-deployment, etc. story in k8s? i can set up a k8s instance with that or k3s or microk8s or whatever relatively easily, but how do i get my code into there without having to build and push images after the smallest change? short googling points to skaffold[0], but is that state of the art? [0] https://skaffold.dev/ https://skaffold.dev/
- yrro 4y agoodo, perhaps? https://developers.redhat.com/products/odo/overview https://developers.redhat.com/products/odo/overview
- mrj 4y agoI'm currently working on creating a local dev with https://tilt.dev/ https://tilt.dev/ and having a good time
- godtoldmetodoit 4y ago+1 on Tilt. It just works.
- ClumsyPilot 4y agoTilt is excellent, and unlike other fools it does not ise YAML, it uses python - real programming language- so you can deal with any strange scoping, pathing,or arbitrary logic like 'look for this file in this folder, but only on second tuesday after full moon' And it is declarative. Try it, and you will never look back
- sound1 4y agoenjoyed your comment!
- ranger207 4y agoFor webdev, my team has the build output directory mounted as hostPath volumes, so you change the files on your disk and the changes are reflected in the pod
- de6u99er 4y agoMy preferred installation method on Linux is via brew [1] opposed to the official installation instructions [2]. Additionally brew contains formulaes for kubectl, k9s, helm, and many other kubernetes related tools. It's the easiest way of keeping everything up2date on a developer machine. [1] https://formulae.brew.sh/formula/minikube https://formulae.brew.sh/formula/minikube [2] https://minikube.sigs.k8s.io/docs/start/ https://minikube.sigs.k8s.io/docs/start/
- nicce 4y agoWow, I did not realise that you can use brew outside of Mac. Thanks.
- solarkraft 4y agoI knew, but am surprised anyone actually uses it. Are there more of you?
- qbasic_forever 4y agoAbsolutely use and love homebrew on linux. All of the fun rust-based tools that get posted here on hackernews (exa, fd, ripgrep, fzf, etc.) are all there and much more up to date than apt. Heck, I find brew is more up to date than nix in some cases.
- jimmcslim 4y agoI have been using it on an WSL/Ubuntu instance just over the last few days... for some things its pretty handy (e.g. in the context of k8s I get a more up to date version of the excellent kubectx utility via brew than apt). But for others its bit of a pain, e.g. building Python through pyenv and using OpenSSL in brew, etc.
- francoispon 4y agoalways using brew on linux/osx, I wish they were supporting shipping binary /cask on Linux like on OSX (only recompiling)
- CSDude 4y agoI've noticed that minikube can also setup multi node cluster which can be nice to simulate some things. https://minikube.sigs.k8s.io/docs/tutorials/multi_node/ https://minikube.sigs.k8s.io/docs/tutorials/multi_node/
- deepsun 4y agoLong time ago I remember Minikube destroyed your hard drive (too many small writes bad for SSDs). Is it fixed now?
- abdusco 4y agoI usually opt for k3d, because it gives you a cluster (or multiple) that runs inside a docker container. If you already have docker running, it's a quick and easy solution for setting up and destroying local clusters. https://k3d.io/ https://k3d.io/
- eatmyshorts 4y agoK3D also mimics a multi-node cluster. K0s, K3s, Rancher Desktop, Minikube, and Docker all run (by default) a single-node cluster. This can be useful when learning about Kubernetes and how it would function in a "real" cluster. 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.
- chrisweekly 4y agoThere was a "use minikube as a drop-in replacement for Socker Desktop" post not too long ago... which is a pretty nice look if it works OOB.
- rckrd 4y agoThat was my post. I'm one of the ex-maintainers of minikube and skaffold as well. [0] https://matt-rickard.com/docker-desktop-alternatives/ https://matt-rickard.com/docker-desktop-alternatives/
- chrisweekly 4y agoGreat post. Also ofc typo S->D for Docker
- russellwolf 4y agoGoogle PM for Minikube here. Here's a link [0] to the Minikube documentation for this use case. [0] https://minikube.sigs.k8s.io/docs/tutorials/docker_desktop_replacement/ https://minikube.sigs.k8s.io/docs/tutorials/docker_desktop_r...
- claudiulodro 4y agoI'm late to the distributed system game, and I have a handful of old PCs which I've been wanting to connect into some sort of "supercomputer" or cluster as a learning exercise. Looking at the docs, it seems to me like I could accomplish that in theory using minikube, by treating the PCs as a local environment and managing them all with k8s. Does that sound reasonable, am I way off base, or is there a simpler method?
- killingtime74 4y agoI would use K3s to set it up
- ClumsyPilot 4y agoK3s and microK8S are both decent choices, K3S appear more well-adopted and 'production grade'
- oofbey 4y agoThe more I use microk8s the less I like it. It seems neato and magic "just works". Until snap upgrades your k8s and it "just stops working". The quality control on their plugins is also pretty low. E.g. the GPU plugin was just completely broken for an entire major version. Also way too often it gets into a confused state where various parts of the system are or aren't running inconsistent with what the microk8s command-line tools think they should be doing, and the best recourse is just to wipe the cluster and start over.
- raffraffraff 4y agoOr k0s! I used it to set up a4x nice cluster in Oracle Cloud and it really doesn't get any easier.
- killingtime74 4y agoWow! Thanks for sharing not heard of this, nice it’s designed for bare metal
- xenophonf 4y agoAnyone else experiencing DNS lookup failures on Minikube-managed clusters running under VirtualBox? The host O/S or host DNS server doesn't seem to matter. I've noticed this when trying to build Alpine Linux-based images, an issue I reported here: https://github.com/kubernetes/minikube/issues/13968 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.
- webwanderings 4y agoHave you seen this? https://github.com/kubernetes/minikube/issues/3036#issuecomment-1045024784 https://github.com/kubernetes/minikube/issues/3036#issuecomm...
- xenophonf 4y agoUnfortunately, that doesn't appear to be relevant to this problem.
- mongol 4y agoWhat I have not understood with running K8S locally. Do I need to run a separate container registry? Or can it read my containers from disk?
- swozey 4y agoYou can run minikube image load image:tag to pull images from your container runtime: https://minikube.sigs.k8s.io/docs/handbook/pushing/#7-loading-directly-to-in-cluster-container-runtime https://minikube.sigs.k8s.io/docs/handbook/pushing/#7-loadin...
- ozarker 4y agoNot sure here but the local k8s setup included with docker desktop uses your local registry. The downside is you have to use docker desktop……
- EdwardDiego 4y agoYou can push images into it, or use it as your docker/podman daemon, so the images are built directly in there, at least with minikube. This command does the trick for the current shell session: eval $(minikube docker-env)
- erulabs 4y agoI run a startup that lets folks attach clusters and I’ll just say, for development or on windows/OSX, I highly recommend k3s and Rancher Desktop (which wraps k3s). Dramatically fewer issues and cpu usage compared to minikube. Minikube does try to be more “correct”, so it’s possibly better strictly for learning kubernetes or hacking on k8s itself.
- deleted 4y ago[deleted]
- LoveGracePeace 4y agoI've tried several of the kubes and k3s for my personal projects works well. I'd use it for work too if I had different options. I think Rancher Desktop might cost though so I use kubectl to do everything.
- mook 4y ago(Disclaimer: Rancher Desktop developer) 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 :)
- rad_gruchalski 4y agoI’m pretty happy with kind on a mac.
- yebyen 4y agoI'm pretty happy with kind on Rancher Desktop on a mac!
- TruthWillHurt 4y ago
- glitchcrab 4y ago
- gjvc 4y agoWhat if they're not, and it is to them?
- TruthWillHurt 4y agoGive me a break... How did you decide on posting this? Did you accidentaly stumble upon Minikube one day? was it news to you? I bet it wasn't.
- ewuhic 4y agoHow does one automate the minikube (or any other flavor) provisioning and setting up the dev environment matched to prod so there would be as little friction as possible? 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?
- hhh 4y agoRancher Desktop, wonderful tool on OS X and Windows when i’ve used it.
- qbasic_forever 4y agoI don't think there's anything that does exactly what you describe, particularly that last few yards of getting the tools, container images, etc. in a dev environment to be consistent across everyone's machines. Maybe a dedicated VM image that's updated and pushed to everyone's dev machines would be best?
- 0x008 4y agoAnsible?
- ewuhic 4y agoNo thanks
- executive 4y agoFor Win10 Pro users, Minikube can run directly on Hyper-V.
- yowmamasita 4y agoAs someone who has learned k8s through Minikube examples, k3s was much better experience looking back.
- oceanplexian 4y agoIt's actually bad that it sets it up quickly, IMHO. 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.
- vonwoodson 4y agoI’m now in an uphill battle with the pointy-haired ones that all this is a waste of entropy. I cannot believe that folks think k8s is a good thing.
- arunc 4y agoWhy do you think so?
- qbasic_forever 4y agoI can't believe folks still want to manage bespoke distributed computing clouds with chef/ansible/shell scripts, homegrown monitoring, deployment, etc. IMHO you know kubernetes is long term good when everyone has complaints of some sort about it but no one can think of a better replacement.
- yCombLinks 4y agoYeah, I don't have all that. I have a few on prem services, and trouble is very rare. Yet they hired some guy that spent a year trying to move our shit into k8s (and failing). He's long gone, and everything is still working fine.
- hnarn 4y agoThe problem is that most people advocating Kubernetes don’t have enough experience with use cases where it doesn’t fit, of which there are many.
- Schopenhauer01 4y agoBeing a part time devops engineer in my previous org, I genuinely do believe that k8s is a good thing. Automating everything is a really good thing.
- arinlen 4y ago> 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.
- SkipperCat 4y agoI like Minikube and it was a read godsend when I was trying to learn Kubernetes. It just "worked" and I was able to play around with deployments and whatnot. 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-7/ 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.
- sureglymop 4y agoWould you say MetalLB is the most straight forward load balancer? 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...
- arccy 4y agodo you have the extra IP space to do service type: LoadBalancer? Most people don't, so it's easier to run something like traefik as DaemonSet with hostPort: 80/443
- mnahkies 4y agoWhich of the various options would people recommend for setting up a single node cluster on a spare laptop (i7, 16gb ram)? I currently use a collection of docker-compose files, but am toying with the idea of switching it out for k8s
- ElCapitanMarkla 4y agoThis is exactly what I’m after right now. My server at home runs off 2 big docker compose files and I’m looking at other options.
- deleted 4y ago[deleted]
- u1tron 4y agoThere is two more can be added 1. https://k0sproject.io/ https://k0sproject.io/ 2. https://microk8s.io/ https://microk8s.io/ The problem with minikube if you have low resource system. It would definitely headache if you run any heavy Workloads.
- cutler 4y agoAs if Docker wasn't enough overhead for a poor laptop. What next - a local virtual data centre for development? Honestly, the infrastructure layers we have to fight with to get shit done these days.
- tifadg1 4y agoI've yet to meet a dev who can coherently explain why s/he uses a laptop instead of a proper pc.
- cutler 4y agoErr ... mobility?
- atombender 4y agoI wonder what devs you've met that can't explain this. 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.
- _paul21 4y agoWe switched from minikube to microk8s for local development at work. We found minikube to be bloated and (at least at early releases) sometimes the vm just broke for no reason and we had to deploy everything from scratch.
- atombender 4y agoI use a Mac, and I have tried Minikube, KinD, Rancher, and also running a VM. And of course, I have Docker Desktop. All of these have failed for me as long-term solution, for the simple reason that they consume way too much CPU and RAM. I would not recommend them on macOS at all. The Kubelet and API server processes are designed around very inefficient polling that easily consumes a whole core even when completely idle. 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.
- yrro 4y agoOpenShift Local (formerly CodeReady Containers) sets up a local-machine OpenShift cluster k8s for development etc. https://developers.redhat.com/products/openshift-local/overview https://developers.redhat.com/products/openshift-local/overv...