![Page 1: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/1.jpg)
Pulumi
Infrastructure as (real) Code -
Managing your K8s resources with Pulumi
Johannes M. Scheuermann Stuttgart, 05. November 2018
![Page 2: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/2.jpg)
• Cloud Platform Engineer
• Kubernetes
• Golang
• …
@johscheuer
Johannes M. ScheuermannMacht Dinge mit der Cloud ?
2
![Page 3: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/3.jpg)
How do you deploy your code to Kubernetes?
3
![Page 4: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/4.jpg)
So many choices (this list is not complete!)4
![Page 5: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/5.jpg)
Fire and forget!
5
![Page 6: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/6.jpg)
Creating Kubernetes resources
K8s API
“kubectl create –f ...“
„ACK“
![Page 7: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/7.jpg)
Getting Feedback from K8s
K8s API
“kubectl rollout status ...“
„Waiting for deployment "todo-app" rollout to finish:
3 of 5 updated replicas are available... “
![Page 8: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/8.jpg)
“Debugging”
K8s API
“kubectl get po –field-selector=status.phase!=Running“
„List of Pods that are not running“
![Page 9: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/9.jpg)
Pulumi
● CLI in Golang● JavaScript/TypeScript, Python, Golang● Supports Kubernetes 1.5+● Gives direct feedback● Also supports AWS, GCP, Azure, Openstack
![Page 10: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/10.jpg)
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
![Page 11: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/11.jpg)
Do I need to rewrite everything?
11
![Page 12: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/12.jpg)
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
![Page 13: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/13.jpg)
Demo time!
13
![Page 14: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/14.jpg)
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
![Page 15: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/15.jpg)
Questions?
15
![Page 16: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/16.jpg)
Vielen Dank
Johannes M. Scheuermann
Cloud Platform Engineer
inovex GmbH
Ludwig-Erhard-Allee 6
76131 Karlsruhe
![Page 17: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/17.jpg)
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
![Page 18: Pulumi Infrastructure as (real) Code - Managing your K8s ... · Pulumi Infrastructure as (real) Code - Managing your K8s resources with Pulumi Johannes M. Scheuermann Stuttgart, 05](https://reader030.vdocuments.site/reader030/viewer/2022041101/5ed8f23c6714ca7f4768dd8e/html5/thumbnails/18.jpg)
Images
● https://www.pexels.com/de/foto/apfel-apple-backsteinmauer-becher-169573
● https://www.pexels.com/de/foto/ausbildung-begrifflich-bildung-diskussion-247708