4 ms·
> Ansible scripts out changes to make to a system. Kubernetes deals only with opaque images and does not change them at all, it simply runs them. You are exact
by gouggoug 9y ago
> Ansible scripts out changes to make to a system. Kubernetes deals only with opaque images and does not change them at all, it simply runs them.
You are exactly right.
Ansible makes the best effort possible to bring your system to a given state (the state you coded in Ansible). All those tools (puppet/salt/ansible) do this exact same thing, and they all manage to do it more or less well.
However, the keyword here is "best effort". That is, it is in practice really hard to consistently bring a system from a random state to a given state X, because of the randomness of your starting state.
Kubernetes doesn't do that, it just manages the lifecycle of your state and makes sure that things run. As an added bonus, it allows you to inject some external configuration to your system, and some other "cool stuff".
You build your state in terms of container images, that once they've been built are by matter of fact set in stone. You then instruct K8s to run all those images.
That, to me, is much more powerful than "scripting out changes to a system".
My scripts are always unreliable and run inconsistently because I make mistakes. In contrast, my container images always run the same way, be they scheduled on my dev machine running mac os, or on my GCE cluster, or my microsoft azure nodes.
> your post does not make sense because it is talking about tools that do different things. It's like saying you love hammers and hope to never use wrenches again.
Those tools k8s and ansible/puppet/etc set out to do the _same thing_. That's the nuance here.
They all set out to bring your infrastructure to the state you programmed.
It so happens that k8s (and more precisely container images) are much better at keeping at consistent state for obvious reasons (container images are state).
K8s is just the cherry on the "container technology cake". It schedules things and makes sure they run, for you.
You weren't too far off with your hammer analogy, but it's more like: ansible is a manual saw and it gives me many blisters, K8s is a chainsaw.
- cookiecaper 9y agoYou still have to define the state to solidify, whether that state is represented by a Docker image or not. That means you still have to script the system before you can crystallize it. Any mistakes you make are still there, so the fact that your scripts are mistake-prone doesn't change anything either way. k8s doesn't help you there, it just adds a nice thick new layer of stuff to break. Snapshotting state in opaque binary "images" via Docker layers/images is a different thing than constructing that state. You can't take a picture of something that doesn't exist. You can, and possibly should, use Docker and appropriate configuration management mechanisms together, but you definitely shouldn't pretend that they address the same issues. Your systems scripted with configuration management will deploy the same way on any VM, local or cloud, and Docker. They all start from a base image, whether it's VDI, AMI, a Docker image, or whatever. It is true that Docker makes it faster to load different states than the other systems, but this has nothing to do with configuration management's role, and it also doesn't come for free; there are tradeoffs to consider here, as in anything else. There are several on this forum who feel that their paychecks depend on the widespread adoption of k8s and/or Docker, and at least some have the ears of the moderators. I'd say at this point, you've revealed enough of your mindset, experience, and intention to make it clear that there is no point going further into this, so let's leave it here and move on. Especially since I'm not going to be allowed to reply, because YC specifically and intentionally doesn't allow k8s skeptics to post very much. Why is that an issue that HN has to create an artificial consensus around? Hmm...
- jacques_chester 9y agoI agreed with you until the conspiracy theory. Sort of a self-fulfilling thing, that.
- cookiecaper 9y agoThere was no theory until my account was rate-limited for posts suggesting that people not use databases on Kubernetes. These were ruled too "tedious" by dang; they rate-limited my account and marked my post at [0] as off-topic. Maybe I just missed the part of the guidelines that said not to be too dry when discussing container orchestration. It's not really self-fulfilling if it's already happened; I think that's just called "information about an event". I think my view that humans are imperfect (yes, even the super-fancy humans at YC, who do have a horse in this race as investors in Docker Inc.) and will censure things they dislike is plenty justifiable given the events. That's especially the case if these people are being pressured to take that action by other high-status individuals. For the record, dang has explicitly disclaimed my theory, rather suggesting that asking people not to run their database in Kubernetes constitutes a flame war. I don't have the link to that handy but I'm sure it wouldn't be hard to find for an interested party. The reader is free to ascribe motives as they see fit. [0] https://news.ycombinator.com/item?id=14453705 https://news.ycombinator.com/item?id=14453705
- jacques_chester 9y ago> However, the keyword here is "best effort". That is, it is in practice really hard to consistently bring a system from a random state to a given state X, because of the randomness of your starting state. This is the logic that BOSH follows. Why try to converge to a desired state if you can just recreate it from a known-good state? Why do you care about grooming individual servers when your goal is a distributed system? Configuration management tools make the classical sysadmin's life much easier. "I have a small group of giant expensive machines to run". The constant struggle of impinging chaos on the systems that Must Not Stop Ever.