458 points · by kadel · 7y ago · 188 comments
My hope is for more competition for development k8s (or k3s!) - minikube and docker-for-desktop is plagued with high CPU usage problems, and OSX-wielding developers are still doubtful. It will require a lot of work and elbow grease to convince them. I've built a hosted platform that tries to address this, but it's a complex education problem, which I am not well suited to solve :(
It works, but it kind of invalidates all assumptions k8s makes about free memory on a node
https://fosdem.org/2019/schedule/event/hw_gitlab_ci_arduino/
Docker Swarm on Raspberry Pi is a very common thing. So, from a performance perspective, these are on par.
Another question is around ingress and network plugin - is it a seamless "batteries included" experience ? Because these are two of the biggest pains in k8s to decide and setup .
- this has the same great K8S API, that Swarm lacks. (Deployment is a first class citizen in kube land, but you only have to make do with the service YMLs in the Swarm sphere.)
- k3s lacks some in-tree plugins, that swarm might have (mount cloud provider managed block device), but there are out of tree addons
- sqlite instead of etcd3 [but available], so out of the box k3s is not HA ready (if I interpret this[1] right, there's one APIserver, and it's something in development )
- this seems more lightweight than a docker setup in some sense (it uses containerd, not full docker), but of course this needs a proper evaluation
- ingress plugins: good question. it should work with traefik [2]
[0] https://github.com/rancher/k3s/blob/master/README.md#what-is...
[1] https://github.com/rancher/k3s/blob/master/README.md#server-...
[2] https://github.com/rancher/k3s/search?q=ingress&type=Commits
Hmm... nothing against k8s, but it’s deployment api is an abomination on par with aws cloudformation.
You need teams of yaml engineers to manage these things.
That's the exact problem Rancher itself is trying to solve, and it does a pretty fantastic job at it.
Though suggesting its "on par" with CloudFormation suggests that you either know a ton about CloudFormation (anything becomes second nature if you're skilled in it) or you don't know much about either of them. Kubernetes isn't that bad.
For example, can I become an INI engineer?
With all due respect, some (like me) consider that a feature of Swarm.
If k3s comes with the same API (and implicit yaml complexity) of k8s, but just reduces RAM usage...well that's not very interesting for me.
Docker Swarm is very lean - there are zillions of videos of how people are building interesting raspberry Pi stacks using it (https://youtu.be/mMpZpa7uUSk).
But for most people using Swarm - they are using it for one reason only : simplicity.
> k3s includes a basic service load balancer that uses available host ports. If you try to create a load balancer that listens on port 80, for example, it will try to find a free host in the cluster for port 80. If no port is available the load balancer will stay in Pending.
Go's concurrency features are formally specified, are not ad-hoc (they are a major feature of the language, and the product of multiple language design iterations) and are certainly not bug-ridden.
Or are you talking about using Kubernetes to manage workloads on machines?
How does Erlang solve running my python webapp or my SQL database on my ec2 nodes, or in the case of this project, on an IoT device.
Unfortunately to use all those features the services needed to be written in Erlang of course, which isn't bad in itself, but unfortunately not the reality in todays multi-lingual atmosphere. Speaks to how highly Erlang was designed and written. It took a lot of real life operational concerns into account in it's design, a concept few other languages even attempt to address.
We run it in Kubernetes in both our CI environment and locally so we can use the same configuration for both. It runs a dozen microservices and saves us a lot of devops time.
In our CI environment it's nice for a developer to roll out a new copy of the services from a different branch for testing, and because of the autoscaler nodes are dynamically provisioned when needed, and then removed when the test environment is destroyed. That's pretty nice functionality you get basically out of the box. On EKS anyway. There are some occasional rough edges, but I think the decision to use k8s for this makes sense...
At some point we'll migrate prod too.
Kubernetes has a lineage as well... Based on the Borg project at Google.
I guess I'm not seeing why these things are being compared. Aren't they solving different problems?
Timely, here's antirez on this topic when Redis was announced on HN ten years ago [0]:
> There are a lot of projects similar to Redis in Erlang actually: http://www.metabrew.com/article/anti-rdbms-a-list-of-distrib...
> Apart from speed what I like of C for this kind of projects is the self-contain-ness and the fact that most developers that may help in the development are probably able to read/write C but not Erlang.
Kubernetes -> K8s -> "kates" -> k3s
One can literally run a full fledged Java EE server in 64mb of Ram. What?
Most definitely.
- https://schd.ws/hosted_files/kccncchina2018english/18/ShengL...
- https://thenewstack.io/rancher-takes-kubernetes-management-t...
Disclaimer: not affiliated with any of the companies above. Edit: formatting.
So that basically means local smarts and fall over in the case of a hardware failure.
Of all things, the Chik-fil-A tech blog gives a pretty good explanation of why you might want this.
After toying with k8s, we realized just how much tinker time our current docker-n-script approach takes to optimize and scale optimally. We're close to moving to k8s after almost a year of on-again/off-again dev and I'm very excited to roll it out. Not as excited as DevOps, maybe, as it's going to lift a lot of weight off their shoulders.
TL;DR: IoT means different things in different industries.
Practically speaking: I worry this will become a parallel but subtlety different implementation of Kubernetes with it's own quirks.
https://landscape.cncf.io/category=certified-kubernetes-dist...
Hello, we're already there. Despite the CNCF certification process, there are many flavours of k8s, all with their own quirks. Being on the product side, it is quite painful to support.
I agree the CNCF certification process isn't comprehensive enough.
Take Openshift as the most extreme example - it's a fork of K8s, with a lot of custom functionality like scc and routes, and also a lot of custom behavior like its admission controllers that manage pod security contexts.
It's almost like a different version of k8s - things that will run on GKE or vanilla k8s won't work on Openshift. Yet, it is CNCF compliant.
https://www.sqlite.org/famous.html
I think the "high availability by redundancy" story is oversold.
More generally, an awful lot of systems that'd be fine with a SQL mirror (non-failover), some real backups on top, and a restore-from-backup event every 3-5 years, plus the occasional 1hr maintenance window, are instead made "HA" and "redundant" at 10+x the ops cost and, unless very well done, with even more down-time anyway because they're so damn complex.
https://godoc.org/github.com/etcd-io/etcd/embed
This is something the Kubernetes community might consider as well.
I want to use and support this product for this reason alone. Etcd was always an un-necessary complexity added for god knows what reason. Later cluster management solutions have abstracted etcd creation and management away (thankfully), but it's always irksome that it is there. Thank you to the K3s development team for taking on that challenge!
Of course that's totally fine for many k8s deployments and might even increase reliability for some use cases, but still, moving from a distributed system to a local one is a significant change.
https://godoc.org/github.com/etcd-io/etcd/embed
This is something the Kubernetes community might consider as well.
I am looking forward to this.
Pretty much any business will want inventory tracking, tracking staff hours, monitoring cameras, sensors for detecting flooding/doors left open/freezers dying, running point of sales terminals, keeping the supply chain running smoothly, handling customer loyalty cards, handling returns, etc.
An on site cluster can help with much of that, even if there's a hardware failure or the network is out.
Question is how will these business find the apps they need that run turn key on some small k8s cluster?
The obstacle to using custom hardware and software in local biz is and has always been, the fact that by relying on it, the one guy who knows how to administer it all becomes the single point of failure for the whole business.
No amount of tooling can save them from that. So local biz will always be beholden to the Oracles of the world, because smart individuals just can't be relied on.
Businesses need to rely on other businesses. A business with a customer service departments and spare stock on hand. K3s or k8s might be used in the technology product offered by such a business, but this by itself won't change the economics of that market.
Seems like there's an opportunity for a cheap 3 node cluster, sold as a value add to businesses and supported a platform that application writers could target. They might well come with a support contract, some basic functionality, and then users could pay for inventory, staff scheduling, point of sales terminal support, integration with food delivery services, etc.
Much like how some home/small business NASs these days have support for 100s of integrations to various online services.
I highly recommend leveraging AWS, Google, Azure, etc services. Especially if you're a small business, spending a little for off the shelf tools that someone else operates and supports is going to help you big time.
Perhaps you'd be better served using more managed services, though?
Kubernetes is only relevant if you have the need to scale your service quickly and/or often. If you run it on your own hardware the value is even more tricky to work out, it can still be a benefit. Whether or not it help you save on hardware cost is extremely dependent on your usage.
- Rolling update? Build it yourself or get it with k8s - Infrastructure as code? Do it somehow yourself with ansible, awx or other setup OR just use k8s - Running different workloads on a bunch of hardware with resource scheduler -> some trickery or x different kind of vms
I like it very much and i hope and guess that the k8s way will take over a lot. And since i'm working with k8s i really wanna have it at home. k3s sounds like a very good way forward.
If you have a good working little setup, you don't need to replace it with k8s.
Your project does sound very cool but I don't think provides a fair basis of comparison re: size and RAM usage.
The problem of GO is that all those unused libraries are loaded in RAM instead of staying on disk, and loaded when needed.
An helloworld in GO (around 1.6MB) is still too large for my openwrt router.
A a few hundreds of megabytes of flash will soon cost less than the plastic and manufacturing costs of the chip itself. At that point, manufacturers will be putting in 128megabyte flash chips simply because 16 megabyte flash chips cost more.
The only place that argument won't apply is in microcontrollers where the flash is on the same die as the CPU.
Thirty years ago someone could have said the same when seeing laptop computers and remembering when computer literally used to occupy whole large rooms.
Come on, let's stop doing this kind of jokes, they add nothing to the discussion.
The word 'embedded' is not well defined, but if you use it on things with 1GB of RAM, what do you call a PIC with 1K?
My personal definition of embedded (which is of course still flawed) is anything without an MMU. A Raspberry Pi isn't embedded for instance, it's just a small computer, just like a phone.
There is certainly a lot of technical merit in calling the five-inch thing in my hand a distributed system of multiple computers, but in practice it's not the common definition.
> ...
> My personal definition of embedded (which is of course still flawed) is anything without an MMU
Probably "embedded" would better be defined as an electronic device capable of performing digital computations small enough to be put literally into other stuff, usually everyday things.
If you mean tiny devices, why not say "microcontroller" or something?
_very_ embedded
Yes 1GB is huge, my Windows Phones are capable of so much with a tiny portion of it.
Maybe that point in time is now, maybe it isn't. But it is coming nonetheless, that is one thing we can be sure of.
For at least 50% of developers, the "physical reality" is that of gathering client requirements quickly and accurately and implementing them correctly and on budget.
Not of micro-optimizing CPU cache hits :)
And it has to run on every node even if the worker nodes are just running workloads.
However unlike Modula-3, Mesa/Ceda or Oberon(-2)/Active/Component Pascal they are load only instead of being possible to unload them, and they require manual binding of symbols.
For this kind of system work a more feature rich dynamism is certaly a big missing feature.
It leaves me wondering though, what is Kubernetes doing with all of these resources? When I saw "lightweight" in the title I expected 5.12MB of RAM, not 512MB.
We use Calico internally, is there a plan in the future to allow other SDNs?
Also tried through docker-compose from the GH repository. It starts the k3s server fine but fails on starting the nodes as they require privileged container mode, which doesn't work on Crostini at the moment.
If you can't make Vanilla upstream Kubernetes work, it is very ill advised to think you will be met with success using a heavily modified fork that has a fraction of the support of K8S.
Some people even used it with LXC, though it seems a bit of a work. e.g. https://medium.com/@kvaps/run-kubernetes-in-lxc-container-f0...
Any specific questions you have?
Host (inside the VM) is a plain Ubuntu 18.04 + Docker 18.06 and Kubernetes 1.13. Currently I have 1 Master and 2 Workers.
I tried to use LXC (and it worked), but for some reason the same setup resulted in 50% (yes, 50%) IOWAIT with LXC in comparison to 4-5% in the 3 KVMs. I didnt really care to look too far into the reason. The server I run it on only has 2 7200rpm SATA drives in Raid 1, so its obviously not the best thing youd want for massive load or an actual production setup.
But its basically my playpen + some private "production" servers, so with 1 User the performance doesnt really matter.