6 ms·
A good method for learning how clusters work and playing with them without having to spend a lot of time re-building when you break things is kind (https://kind
by raesene9 7y ago
A good method for learning how clusters work and playing with them without having to spend a lot of time re-building when you break things is kind (https://kind.sigs.k8s.io/ https://kind.sigs.k8s.io/).
Each node is a Docker container, but the version of Kubernetes running inside it is vanilla Kubeadm, so it's quite representative of what "real" clusters would look like.
The great thing about it is you can spin up a cluster in < 2 mins locally to try things out, then it's a single command to delete.
- geerlingguy 7y agoI use Kind (and Minikube, and a number of other solutions too), but this is kind of my "Kubernetes-the-really-hard-way" fun project. Note that I maintain a parallel configuration that runs a multi-node cluster on Vagrant for local development [1] as well as a docker environment built for CI purposes[2] using almost all the same images, with the same Ansible playbooks to configure them all across platforms. [1] https://github.com/geerlingguy/raspberry-pi-dramble/tree/master/testing/vagrant https://github.com/geerlingguy/raspberry-pi-dramble/tree/mas... [2] https://github.com/geerlingguy/raspberry-pi-dramble/tree/master/testing/docker https://github.com/geerlingguy/raspberry-pi-dramble/tree/mas...
- raesene9 7y agoyeah I think this approach will have fewer limitations than kind, and also it's fun to try different approaches! BTW I think your ansible book is great, really helped me get to grips with it.
- vlahmot 7y agoThank you for all of your great Ansible work! I leverage a lot of them at work and they have been great! (I’ll be playing around with these!)
- fizixer 7y agoSorry, late to the party. Thanks for sharing. I fully agree with the fun, and the really-hard-way part. However, if we ignore that part for the moment, would you think having an R-Pi cluster handy is worth it for training/sandboxing/testing with the aim of applying the skills in your day job? Are there any advantages to having access to your own R-Pi kubernetes cluster, despite having stuff like Kind and Minikube available online?
- mkesper 7y agoHow does this compare to k3s? https://rancher.com/docs/k3s/latest/en/ https://rancher.com/docs/k3s/latest/en/
- sandGorgon 7y ago+1 to this. k3s is an extremely lean and simpler k8s. it is a fully certified k8s distro ..with backward compatibility code removed. perfectly fine running on rpi or production.
- raesene9 7y agok3s is usually (AFAIK) run on VMs for production purposes, rather than being used for testing, which is where kind shines. The major advantage of kind is you download a single binary, run one command and quickly have a functional, disposable cluster, anywhere that Docker runs.
- deleted 7y ago[deleted]
- darren0 7y agok3s also shines in dev/test/CI. It's smaller and spins up faster and has specific features to preload applications on startup. It's a single ~50mb binary also so it's fast to download and run in CI. Many users have moved from kind to k3s in CI because of its speed, flexibility, and simplicity.
- bndw 7y agoKind is explicitly not for production workloads[0]: Non-Goals: Being “production workload ready” - kind is meant to be used: for testing Kubernetes itself for testing against Kubernetes (EG in CI on Travis, Circle, etc.) for “local” clusters on developer machines NOT to host workloads serving user traffic etc. K3s seems happy to support production workloads. It's a single binary and gets you a cluster in one command: curl -sfL https://get.k3s.io | sh - sudo kubectl get nodes Personally, I use both Kind and k3s. Kind is great for running locally and k3s is awesome for single-node kubernetes on a vps. [0] - https://kind.sigs.k8s.io/docs/contributing/1.0-roadmap/#non-goals https://kind.sigs.k8s.io/docs/contributing/1.0-roadmap/#non-...