650 points · by emersonrsantos · 5y ago · 220 comments
Rancher have a pretty good track record so far:
- the Rancher platform itself (https://rancher.com/) is a really powerful and user friendly way to manage container clusters of all sorts, giving you a self-hosted dashboard for both your cloud and on prem clusters, for a variety of Kubernetes distributions; you can even manage the available drivers and also create deployments graphically
- the K3s distribution (https://k3s.io/) is in my eyes one of the best ways to run Kubernetes yourself, both in development environments and production ones. I benchmarked K3s alongside Docker Swarm as a part of my Master's thesis and it was surprising to see that its overhead was actually very close to that of Docker Swarm (a more lightweight orchestrator that's included with Docker and uses the Docker Compose format), only exceeding it by a few hundred MB with similar deployments being active, making K3s passable for small nodes
As for this particular project, it's very positive to see that it supports all of the big OSes, even though the 0.6.0 version tag would still advise caution for a while, even though it can definitely be considered as a replacement for Docker Desktop.Admittedly, it's also nice to see that Docker and the ecosystem around it is still supported and is alive and kicking, since for many projects out there it's a perfectly serviceable stack with tools that a lot of people will be familiar with, as opposed to having to migrate to podman, while it's still becoming more and more stable, yet isn't quite there yet. Now, that may be a controversial take, and Docker Inc also have their fair share of challenges, about which there was a very nice writeup here: https://www.infoworld.com/article/3632142/how-docker-broke-i...
Rancher's got a well deserved good impression in my mind, though early on I avoided them somewhat.
Probably not a good recommendation until this hole is plugged.
What makes it different from other K8s distros is listed here: https://rancher.com/docs/k3s/latest/en/
And here's an architecture overview: https://rancher.com/docs/k3s/latest/en/architecture/
At a glance:
- by default packaged as a single binary, so is extremely easy to install, even uses SQLite for storage (though that can be swapped out for others as well)
- includes the functionality that you'd expect, like local storage, load balancing, ingress, while at the same time getting rid of some of the unnecessary plugins that you'd get in other distros
- as a consequence of the above, has a small runtime footprint, so running K8s clusters on VPSes with 2 to 4 GB of RAM is no longer a pipe dream, also has way less overhead on the actual nodes that you want to manage (think along the lines of a few hundred MB)
- also includes a variety of tools with it for managing your cluster more easily, so you don't need to install those separatelyIf you are going to run a cluster you're likely going to want to have your database be an HA cluster. While k3s can support other databases, like PostgreSQL, it doesn't have handling for clusters in the config.
This is a limitation I see for k3s in clusters, right now.
I would love to see cluster handling in k3s. etcd can be a scaling bottleneck and replacing it with PostgreSQL could help it scale much higher.
Disclaimer, I work on Rancher Desktop which uses k3s
In case anyone desires to mess around with PDFs and machine translation:
- research praxis: https://files.kronis.dev/s/AJRCs84D7WngLzD
- development praxis: https://files.kronis.dev/s/Xz6mtbAamoA7Pe8
- the full text: https://files.kronis.dev/s/ioiW96dpnD5YcLk
Here's a tl;dr summary of what i did during it: essentially i set out to improve the way applications are run within the infrastructure of the company that currently employs me. To achieve that, i researched both the ways to utilize systemd services for everything as well as improve configuration management with Ansible, later introduce containers into the mix and compare their orchestrators (Docker Swarm and K3s in this case), as well as how to manage them, in this case, with Portainer. Then, after finishing that stuff up for the company, i proceeded with some further research of my own, into whether it's feasible to develop bespoke server configuration management tools and to integrate them with container management technologies, as well as do further benchmarks on how well the orchestrators actually handle containers running under load, since this doesn't often get tested.There are probably a few reasons for those choices:
- at work, it was really disappointing to see environments where servers are started manually
- similarly, in the current day and age it's not acceptable to keep domain knowledge about how to start services and where the configuration is to yourself
- manual configuration management simply increases the risks of human error greatly, especially due to turnover
- in contrast, containers are a surprisingly usable way to introduce "infrastructure as code"
- that said, their orchestrators still need a lot of work and it's probably a good idea to compare them
- i was also curious to see whether it would be hard to create my own automation tools like Ansible, but executing remote Bash scripts through SSH
- lastly, i was a participant in the development on https://apturicovid.lv/ which was a Latvian COVID contact tracing solution; i was curious about the choice of using Ruby, so i wanted to create my own mock system to see how it'd perform under load in a real world scenario, with tools like K6s https://k6.io/
More importantly, i wanted to see how much load a GPS based approach (as opposed to Bluetooth) with PostGIS would generate and whether Ruby would still be okay, as described on my blog https://blog.kronis.dev/articles/covid-19-contact-tracing-wi...And, without further ado, here's my findings:
- if you're not using Ansible or another alternative for managing the configuration of your environments, you should definitely look into it
- if you can't or don't want to run containers, at least consider having systemd services with environment config files on your servers
- Docker Swarm and the lighter distributions of Kubernetes, like K3s are largely comparable, even though Kubernetes takes a little bit more resources
- tools like Portainer can make managing either or both of them a breeze, since it's one of the few solutions that support both Docker, Docker Swarm and Kubernetes clusters
- despite that, you'll still probably want to configure your applications (e.g. HTTP thread pool sizes, DB pool sizes) and introduce server monitoring or APM into the mix
- as for Python, it's pretty good for developing all sorts of solutions, even for remote server management: with Paramiko (for SSH), jsonpickle (serialization), Typer (CLI apps) and other libraries
- for my tool, i used JSON as an application data format, so one command could pipe its JSON output (e.g. returned tokens from cluster leader server for follower servers) as an input for another; there are few cases where this can work, but when it does, it is pretty nice
- that said, any such tool that you write will probably just be a novelty and in 90% of the cases you should just look at established solutions out there
- load testing is actually pretty feasible with tools like K6s, but only as long as you just want to test Web APIs - anything more complex like that might be better tested with something like a server farm running instances of Selenium
Here's a few Git repos of the projects: - A very simple COVID infection tracking system which generates heatmaps to attempt to preserve anonimity: https://git.kronis.dev/rtu1/kvps5_masters_degree_covid_1984
- The K3s benchmarks for it: https://git.kronis.dev/rtu1/kvps5_masters_degree_covid_1984_load_test
- The Python configuration management tool: https://git.kronis.dev/rtu1/kvps5_masters_degree_astolfo_cloud_servant
Oh, and here's a test environment for the mock system that shows the generated heatmaps, you'll need to press the "Start" button to preview the data, though you can change the visualization parameters at runtime: https://covid1984.kronis.dev/https://gitlab.com/stavros/harbormaster
It basically pulls the repos you specify and runs `docker-compose up` on them, but does it in an opinionated way to make it easy for you to administrate the machines.
When the controlling organization is starting to go down the user hostile route (e.g. payed update opt-outs), it is more or less sad to see that the Docker is alive and kicking. Developers should ran away as fast as possible.
(This isn't to take away from Rancher, by the way - good on 'em, I'm all for competition in developer tools)
1. Not every widely-used tool needs to be a VC-powered unicorn startup. I'd be pissed if Linus/the Linux Foundation started to demand a per-core licensing fee. I'd probably convince my organization to switch to a BSD, on principle.
2. No one likes a bait-and-switch, and lately, lots of companies see Free/Open Source Software as a "growth hack technique" rather than an actual philosophy, because they'll otherwise face headwinds with a closed-source product. This is akin to the underwear gnome strategy:
1. Author Open Source product
2. Get wide adoption
3. ???
4. ProfitSure, there are alternative repositories and for your own needs you can use anything from Sonatype Nexus, JFrog Artifactory, Gitlab Registry or any of the cloud based ones, but Hub disappearing would be a 100 times worse than the left pad incident in the npm world.
Thus, whenever Docker Inc releases a new statement about some paid service that may or may not get more money from large corporations, i force myself to be cautiously optimistic, knowing that the community of hackers will pick up the slack and work around those tools on a more personal scale (e.g. Rancher Desktop vs Docker Desktop). That said, it might just be a Stockholm Syndrome of sorts, but can you imagine the fallout if Hub disappeared?
Of course, you should never trust any large corporation, unless you have the source code that you can build the app from yourself. For example, Caddy v1 (a web server) essentially got abandoned with no support, so the few people still using it had to possibly build their own releases and fix the bugs themselves, which was only possible because of source code availability, before eventually migrating to v2 or something else.
Therefore, it makes sense to always treat external dependencies, be it services, libraries, even tools like they're hostile - of course, you don't always have the resources to do that in depth, but for example seeing that VS Code is not the only option but we also have VS Codium (https://vscodium.com/) is encouraging.
If open-source helps the product grow and the community benefits then what's the problem? Who lost here? And why are there headwinds with closed-source products anyway? Open-source doesn't mean free, so what's the objection?
Docker the company executed poorly in monetizing their product but there's a lot of undue hate compared to the value it has created. If you don't like it when it's closed-source, and you don't like it when it's open-source, then what do you want exactly?
Ok, which tools need to be a VC powered unicorn? I’m serious.
Not quite bait & switch as you put it, and frankly polishing and idiot proofing tools for production workloads is expensive, and requires competent professionals that definitely need to feed themselves and their family.
+ opinions about Docker are generally not universally positive, which doesn't help. It's not a niche thing only used by superfans, but something that has been promoted and pushed widely. Not everybody who uses it likes it, and it's more infrastructure than "cool tool".
I have never seen such user-hostile behaviour from an established company like this and I for one will never ever give them a cent to reward them for it.
Chrome for example has update button in similar placement.
To me they are the definition of worse is better, but clearly only for a while.
Not only that, but it was a bait and switch. Lots of people are using docker because of the previous licensing rules and might have chosen another tool if the new licensing was already in place.
I don't fault docker but I can see why people are annoyed and looking for a drop in replacement as well.
There are no gifts, Docker isn't owed billions for trying to monetize cgroups.
That is true and that is why the Docker runtime is still free.
However this is about Docker desktop, which is mostly used on Mac and other platforms, where docker actually manages virtual machines etc.
And yeah, all software is just a layer on top of moving bits around ... some of those layers create value, some less.
The cognitive dissonance and entitlement with some is just funny to watch. They have no problem buying stuff from billion dollar companies who treat workers as crap and don't pay taxes, but a smaller developer wants to make money off of their hard work? Nah...
It's probably because a good chunk of the community is composed of privileged people, who never experienced the struggle.
That’s not on offer. Instead we get a client that’s almost as bloated as the Dropbox client.
Think of those "by the pound" frozen yogurt and toppings places. One day they charge a fair price and sometime later they up their prices and start charging different amounts for different stuff, etc.
I'm not angry if I dip on over to the grocery store and get my own stuff instead. Disappointed that we lost something cool, maybe, but that's on THEIR dumb choices.
Thankfully that's not the case. Even kubernetes, that still uses containers, moved away from docker.
anything from centralized authentication/auditing/monitoring/provisioning/reporting to checklist certifications gov demands.
I for one mostly use GPL or similarly licensed tools for my development workflow to be able to make sure my building infrastructure doesn't rot, and can be completely replicated by someone when I open the code (with a xGPL license, no less).
OTOH, I pay for some good developer tools, since they make my life easier. However, they're not irreplaceable and they're definitely not "code pipeline infrastructure" tools.
a) pretty much any closed source project or online service can be done just as well by gluing together parts of open source projects…
Which may be true in some cases, but the real misapprehension is the final part:
b) …and it won't be difficult to do.
The classic is the HN comment about Dropbox, but I see at least one comment a week saying something similar. No doubt there are many more.
The tools aren't created in vacuum and the creators also have bills to pay, just like I do as well.
Then they still make their technology available for free (that's right, docker is still free and they donated all the important stuff) and start asking money for just the wrapping and UI stuff in desktop. And just for big corps who can afford it. And still they get a lot of flak for it!
These people just can't get a break. I don't understand why a lot of people in OSS community hate on them so much. What is up with that?
Suse has a functioning business model and makes money from real paying customers who want services in return, not just VCs who want more money in return. Docker has a valuation without a way to live up to it, which is scary because we all have to wonder what awful stuff they're going to have to do in order to make enough revenue for their investors to get their money back.
While I love Docker as a dev tool putting all strings into your hand to juggle customer environments, I fail to see the use case of Docker on Macs and Windows, which I'm understanding what Docker desktop is about. After all, docker images are about saving the resources/memory for a full VM and using Linux kernel-level compartments instead.
When you're developing in a container you can guaranty that the environment is the same on your PC or in the cloud.
Also, the same argument you had for shared resources in Linux, when you're running Linux on a VM locally on your desktop because you want linux tools or applications, then you want as much memory management as possible.
That's not what container images are for.
Container images give you a self-contained deployment artifact. The rest is marketing BS.
Docker Desktop is all about Docker, Compose and Swarm, and has Kubernetes functionality built on top as an extra. Rancher Desktop seems to be all about Kubernetes - can it even run standalone Docker containers, or Compose/Swarm services?
EDIT: answering my own question - I checked the nerdctl GitHub page, and it states that not only is Swarm not supported, but it will not be. So Rancher Desktop is unfortunately not a drop-in Docker Desktop replacement for everyone :(
When podman will fix this issue (with sshfs like lima does?) I'll return to it
This works today, and works very well.
Hate to be "that guy" but if you want speed in a Linux environment then just run Linux ;). If you're really stuck with Windows and need Docker, I'd say try hyper-v, VMware, etc and see which is fastest.
If you keep your files in WSL 2's file system Docker is extremely fast. It's nearly as fast as native Linux and even apps with thousands of files will reload web servers nearly instantly on file change using volumes.
For everything else you can just use the network mount to WSL2. So the performance hit will be on the editor I/O side but not the application runtime.
You can browse directly to the WSL container filesystem through Windows by browsing to:
\\wsl$
Example: click Start --> Run --> "\\wsl$"
Is that what they're looking for?
For example, on Windows you'll likely use NTFS which is a slower file system than ext on Linux. Then, NTFS can be mounted in which isn't fast. So, filesystem operations though this in WSL are going to be slow.
This is just an example and may not be your setup.
Rancher Desktop uses WSL to run Kubernetes and containerd. This is similar in setup to Docker Desktop. So, if you have performance issues in one setup you're likely to have them in the other. And, it may be related to WSL and the VM than to either of these apps.
Disclosure, I work on Rancher Desktop.
.\Rancher.Desktop.Setup.X.Y.Z.exe /S --force-run --allusers
It took me an hour to figure out the necessary arguments until I learned about some Electron-specific behavior in the installer[1].[0] https://github.com/rancher-sandbox/rancher-desktop/releases
It's just:
Rancher.Desktop.Setup.0.6.0.exe /S
The --force-run option you specifically don't want for a silent install. Also, the --allusers option doesn't work.- transparent networking, i want to access kube services on 127.0.0.1, i'd rather not run a proxy/manage things myself - access to containerd socket to use non-rancher tooling, for image building etc.
early days for this project, i'll have to spin it up and see how it goes!
So end 2019 we started using k3s... But developers complained about heavy resource usage, and slow startup time.
So in the end we moved back to docker-compose... This means our local dev environments are NOT the same as our k8s prod clusters.
But if this works well, and k3s is more lean. It could unify our infra stack across developer machines, to production. Same tooling everywhere...
Love it
Also, I am not very lucky in having resemble 1:1 k8s cluster locally. You could be close, but as long as you run in the cloud you will have different configuration on local (additional annotations, various quirks that do not exist in kind/k3s but they are on GCP). However, making dedicated dev environments in the cloud might be very costly and incur a lot of additional tinkering.
[0]: https://tilt.dev/
[1]: https://docs.tilt.dev/api.html
[2]: https://docs.tilt.dev/example_csharp.html
[3]: https://github.com/tilt-dev/tilt-example-java/blob/master/10...
My best experience so far, has been to start services individually, and work with mocks and tests. And do integration on a shared staging environment or, even better, have a way to deploy multiple versions to the same env (like you can do with App Engine, Vercel, etc).
I hope I never ever again have to work at a place where I need to replicate the entire platform for my development environment.
Not very convenient, but not a show - stopper.
Oh, well. I guess they copied everything that was "good" then.
[0] https://community.suse.com/posts/rancher-desktop-v06-includi...
k3d/k3s starts up fast and feels minimal. I still have problems building docker images and pushing them into the cluster.
Minikube solves this well: ``` minikube image build . -t localhost:5000/myapp:latest minikube image push localhost:5000/myapp:latest ```
I will be very happy when one of these runs locally without com.docker.hyperkit running 70% CPU even while idle.
We liked 1.x/cattle as much as the next person but it was clear 4 years ago that k8s was going to win the mind-share & market.
Competing with that was a slow and painful path to irrelevance. Which was the path Mesos chose, along with Docker/Swarm to a large degree.
(Please stop running 1.x, especially if exposed to the internet; it hasn't been updated in ~3 years now and everything up and down the entire stack it supports are going to be full of CVEs.)
That's one of the most important usecases on windows going forward.
The graphic under that quote shows containerd and k3s running under WSL2 talking to Rancher desktop.
Slightly unrelated but also, from the same company, Rancher (their main product) has been really good to deploy bare meal Kubernetes setup [almost] 100% container based.
^^ volume mounts appear to "just work" on macOS
I agree that having an example in writing would have been helpful.
Can rancher solve this usecase?
> © 2021 SUSE. Rancher Desktop is an open source project of the SUSE Rancher Engineering group
It is strange that they don't make it super clear. But it is briefly mentioned in the top video on the hero section of the page.
>© 2021 SUSE. Rancher Desktop is an open source project of the SUSE Rancher Engineering group.
I'm a simple man.
> Docker Desktop is an application for MacOS and Windows machines for the building and sharing of containerized applications and microservices.
The "desktop" part of each refers to "systems other than linux."
You can run rancher on a linux machine just as you can run docker on a linux machine - without the "desktop" part of it. As I understand it, the "desktop" nature of it is the glue between running a virtual machine on a non-linux system and the underlying virtual magic.