Slide 1

Slide 1 text

From Terraform to Kubernetes Creating and Sharing secrets From Terraform to Kubernetes Creating and Sharing secrets

Slide 2

Slide 2 text

$ whoami ● Engineer @ Manifold ● Focus on Operations Experience ○ Terraform ○ Kubernetes ● Gopher since 2014 ● Curator @ Kubelist Jelmer Snoeck @jelmersnoeck github.com/jelmersnoeck

Slide 3

Slide 3 text

(yes I have stickers)

Slide 4

Slide 4 text

$ tree ● Terraform & Kubernetes ● Static secrets ● Dynamic secrets

Slide 5

Slide 5 text

Terraform & Kubernetes

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

So why this talk?

Slide 9

Slide 9 text

Cloud Native

Slide 10

Slide 10 text

Setup

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Static Secrets

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

(don’t worry, it’s already deprovisioned)

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

PGP / Saltpack

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Cons - Team management is hard - add team members - delete team members - Remembering to re-encrypt is hard - Obscure encrypted file format - Copy paste values from Terraform

Slide 22

Slide 22 text

git-crypt

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

$ git-crypt unlock

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Cons - Team management is still hard - Obscure encrypted file format - Copy paste values from Terraform Pros - Encryption is done automatically

Slide 31

Slide 31 text

Sealed Secrets

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Cons - Copy paste values from Terraform - Manually encrypt values - Need access to the cluster to encrypt Pros - Access is taken care of through the k8s cluster - Readable files

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Dynamic Secrets

Slide 39

Slide 39 text

Terraform Kubernetes Provider

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Cons - Setup might be tricky - Spin up k8s and then immediately use it - Limited to Terraform secrets Pros - Secrets are automatically injected

Slide 43

Slide 43 text

Hashicorp Vault

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

Cons - Need to add extra setup - envconsul - application code Pros - Great Vault features - Custom integrations - Temporary credentials - Rotation - RBAC - Can store external credentials - Vault Operator!

Slide 48

Slide 48 text

Manifold Credentials Controller

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

Cons - No one off passwords/temporary keys Pros - Still using the 12factor methodology - Can connect with external services - RBAC at service level

Slide 56

Slide 56 text

Reminders - Encryption - secrets - etcd - remote state - RBAC for secrets - Figure out what you need

Slide 57

Slide 57 text

@jelmersnoeck manifold.co Thanks Questions?

Slide 58

Slide 58 text

Resources - Manifold Credentials Controller - Manifold Terraform Provider - Hashicorp Vault - Hashicorp Vault Operator - Bitnami Sealed Secrets