Kubernetes for the Ansible users - OpenInfraDays 2019 · Why? What? 2. Ansiblefor Kubernetes...

Preview:

Citation preview

Rome, 2019-10-03

Kubernetes for the Ansible UsersAndrea Tosatto

Why this talk?!

$ whoami

Agenda

1. Kubernetes? Why? What?2. Ansible for Kubernetes

o Implementing Kuberneteso Migrating existing services to Kuberneteso Managing the lifecycle of Kubernetes applications with Ansible

3. Questions

Kubernetes? Why? What?

Why Kubernetes?

1. Decoupling between the work of Devs and Ops

Why Kubernetes?

1. Decoupling between the work of Devs and Ops

2. High level abstraction on the infrastructure

Why Kubernetes?

1. Decoupling between the work of Devs and Ops

2. High level abstraction on the infrastructure

3. Integrated state reconciliation mechanism

Why Kubernetes?

Ansiblefor Kubernetes

Implementing Kubernetes

Container Engine […] Container Engine

Kubernetes

VM 01 VM 0M[…] VM N1 VM NM[…]

Host NHost 1 [...]

Network

Storage

APP “A” APP “B” APP “C” APP “D” APP “B” APP “E”

Implementing Kubernetes

Container Engine […] Container Engine

APP “A” APP “B” APP “C” APP “D” APP “B” APP “E”

Kubernetes

VM 01 VM 0M[…] VM N1 VM NM[…]

Host NHost 1 [...]

Network

Storage

Implementing Kubernetes

Container Engine […] Container Engine

APP “A” APP “B” APP “C” APP “D” APP “B” APP “E”

Kubernetes

VM 01 VM 0M[…] VM N1 VM NM[…]

Host NHost 1 [...]

Network

Storage

APP “A”

VM 01

Host 1

Eureka! We finally have onetool to manage the whole

infrastructure

Migrating Existing Services to Kubernetes

APP “A”

VM 01

Host 1

Eureka! We finally have onetool to manage the whole

infrastructure

APP “A”

VM 01

Host 1

K8SCONTAINERIZED

APP “A”

Migrating Existing Services to Kubernetes

Eureka! Let’s use Kubespray!

APP “A”

VM 01

Host 1

Eureka! We finally have onetool to manage the whole

infrastructure

APP “A”

VM 01

Host 1

K8SCONTAINERIZED

APP “A”

VM 01

Host 1

K8SCONTAINERIZED

APP “A”

Migrating Existing Services to Kubernetes

Eureka! Let’s use Kubespray!

Eureka! Let’s use Ansible’s k8s

modules!

APP “A”

VM 01

Host 1

Eureka! We finally have onetool to manage the whole

infrastructure

APP “A”

VM 01

Host 1

K8SCONTAINERIZED

APP “A”

VM 01

Host 1

K8SCONTAINERIZED

APP “A”

VM 01

Host 1

K8SCONTAINERIZED

APP “A”

Migrating Existing Services to Kubernetes

Eureka! Let’s use Kubespray!

Eureka! Let’s use Ansible’s k8s

modules!

Lifecycle management of K8s apps with Ansible

What about legacyapplications, stateful

service, database migrations, ..?

Lifecycle management of K8s apps with Ansible

+

What about legacyapplications, stateful

service, database migrations, ..?

Conclusions

Ansible will still play a key role in the management

of servers and infrastructure

You don’t have to use Kubernetes…

But eventually you might end up doing it!

Thanks!

Andrea Tosatto@_hilbert_

OpenInfra Days2019

References• Kubespray: deploy a Production Ready Kubernetes Cluster with Ansible

https://github.com/kubernetes-sigs/kubespray• Ansible Kubernetes Module

https://docs.ansible.com/ansible/latest/modules/kubernetes_module.html• Ansible Operator

https://www.ansible.com/blog/ansible-operator

info@irideos.it

800.585.383 fisso

+39 02.87200983 mobile e internazionale

irideos.it

Recommended