Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real)...

Preview:

Citation preview

Pulumi

Infrastructure as (real) Code -

Managing your K8s resources with Pulumi

Johannes M. Scheuermann Stuttgart, 05. November 2018

• Cloud Platform Engineer

• Kubernetes

• Golang

• …

@johscheuer

Johannes M. ScheuermannMacht Dinge mit der Cloud ?

2

How do you deploy your code to Kubernetes?

3

So many choices (this list is not complete!)4

Fire and forget!

5

Creating Kubernetes resources

K8s API

“kubectl create –f ...“

„ACK“

Getting Feedback from K8s

K8s API

“kubectl rollout status ...“

„Waiting for deployment "todo-app" rollout to finish:

3 of 5 updated replicas are available... “

“Debugging”

K8s API

“kubectl get po –field-selector=status.phase!=Running“

„List of Pods that are not running“

Pulumi

● CLI in Golang● JavaScript/TypeScript, Python, Golang● Supports Kubernetes 1.5+● Gives direct feedback● Also supports AWS, GCP, Azure, Openstack

Pulumi and Kubernetes

● Kubernetes provider in JavaScript/TypeScript● Allows to mix cloud-infrastructure with deployments● Allows to define dependencies● Allows to define custom functions● Allows to use conditionals● Use Helm Charts● Combine Docker image build + deployment● Cascading Deployments

Do I need to rewrite everything?

11

Pulumi basics

● Pulumi manages projects● A Stack is an instance of your project● Pulumi can manage multiple stacks● A Stack uses packages (e.g. AWS, GCP, ...)● Each stack can be configured

Demo time!

13

Conclusions

● Looks like a nice alternative to terraform● Still in the early days● Up to date Kubernetes client● Nice to use all features from your IDE● Take a look at kubespy● Try it out

Questions?

15

Vielen Dank

Johannes M. Scheuermann

Cloud Platform Engineer

inovex GmbH

Ludwig-Erhard-Allee 6

76131 Karlsruhe

jscheuermann@inovex.de

Reading list

● https://blog.pulumi.com● https://www.pulumi.com● https://blog.pulumi.com/program-kubernetes-with-11-

cloud-native-pulumi-pearls ● https://github.com/pulumi/kubespy

Recommended