Hacker News new | ask | show | jobs
by shawabawa3 2823 days ago
> k8s yaml files are really a breeze of fresh air compared to Ansible playbooks

Hah. I'm a huge kubernetes fan but not sure I can agree here.

k8s yaml files are the most verbose and spammy things imaginable.

granted, ansible playbooks can be horrific, but i'd say that's more down to the authors of the playbook than ansible itself.

2 comments

Ansible is a glorified templating language for composing, distributing and executing shell scripts.

K8s is designed around a desired state of the world with control loops.

The two are very different conceptually, and lead you in different directions organizationally.

Ansible encourages you to code the derivative and hopefully approach the integral, whereas K8s encourages you to code the integral and infer the derivative in your controller, if that makes sense.

This is definitely a point.

Kubernetes resource definitions are verbose, but you can expect them to always be about that verbose and nothing else.

Ansible playbook instead really depend on the author, they can both be works of art or abominations.

I imagine as Kubernetes becomes more popular there will be a lot more of these abominations present... similar thing has happened in popular programming languages—as they are more widely adopted, early adopters who were more focused on quality and correctness are fewer, and new devs who do 'all the wrong things' are much more prevalent.

It's more of an issue with your organization's (or in some cases, personal) process if you allow abysmal code to get checked into your codebase :) Even Ansible has easy to integrate linting and testing tools.