Troubles in Kubernetes Land:
Vault to the Rescue
Webinar devops.com
November 2019
© 2019 InfluxData. All rights reserved.2 @gitirabassi
Giacomo Tirabassi
InfluxData
SRE
󾓩 Italian
☸ Kubernetes in production since
v1.8
🍝 love to cook and eat
󾓦 lived 1 year in Memphis
󾓭 lived 1 year in Shanghai
© 2019 InfluxData. All rights reserved.3
© 2019 InfluxData. All rights reserved.4
What’s the problem?
© 2019 InfluxData. All rights reserved.5
© 2019 InfluxData. All rights reserved.6
Solution: use a managed
kubernetes solution
© 2019 InfluxData. All rights reserved.7
© 2019 InfluxData. All rights reserved.8
A little bit of context
• Multiple clusters
• Multiple regions
• Multiple cloud (also on-prem)
• Minimal operational effort
• Maximum automation
© 2019 InfluxData. All rights reserved.9
© 2019 InfluxData. All rights reserved.10
Kubernetes is just an application
a critical one
© 2019 InfluxData. All rights reserved.11
Automation: a little digression
Stateless
applications
(easy)
Stateful
applications
(hard)
Critical
applications
(he/she needs some milk)
© 2019 InfluxData. All rights reserved.12
Automation: why so hard?
• Credentials go from long lived to short lived
• How to observe?
• How to test?
• How to rollback? or rollforward?
• What can go wrong? and how to deal with it?
IMMUTABLE
INFRASTRUCTURE
© 2019 InfluxData. All rights reserved.13
When deploying Kubernetes yourself
• Manage Etcd
• Manage PKI
• Manage Nodes
• Upgrade Controlplane + Nodes
• Update configurations
• DR / BC
© 2019 InfluxData. All rights reserved.14
What can go wrong?
• 2 out of 5 of the HIGH risk are TLS related
• certificate expiration is an issue
• ETCD data dump is underestimate
• certificates and keys can be accessed on the master node if
PSP are not turned on
© 2019 InfluxData. All rights reserved.15
How can vault help?
© 2019 InfluxData. All rights reserved.16
Two parties needs access to Vault
• Human
LDAP
OIDC
• Nodes
aws
gcp
azure
alicloud
© 2019 InfluxData. All rights reserved.17
Humans need to SSH into nodes
• SSH Secret Engine: using Signed Keys can be as simple as
• vault login -method=oidc
• vault ssh -mode=ca ubuntu@192.168.0.10
© 2019 InfluxData. All rights reserved.18
Humans need access to K8S
• Identity secret engine is OIDC compatible
• added in v1.2.0
• very customizable id_token content
• automatic key rotation
© 2019 InfluxData. All rights reserved.19
3 types of nodes and policies
• Etcd nodes
• Control plane nodes
• Worker nodes
© 2019 InfluxData. All rights reserved.20
Etcd nodes
• Need access to ETCD server and peer certificates
• PKI Secret Engine is made for this
© 2019 InfluxData. All rights reserved.21
Control Plane nodes
• Need access to ETCD client certificates
• Need access to APIs CA
• Need access to front-proxy CA
• Service Account private/public keys (sign/verify JWT tokens)
• Needs access to Vault Transit backend to encrypt data in etcd
© 2019 InfluxData. All rights reserved.22
Worker nodes
• Need access to Kubeadm Join Token
Custom secret engine plugin
When a node needs access creates a short-lived token on kubernetes
Token validity can be configured, but 1 minute is default
• Needs access to kubelet server certificates
by default kubelet uses self-signed ones
© 2019 InfluxData. All rights reserved.23
Static secrets
• Migrations are hard
• For long lived secrets (eg. TLS certificates, api keys, etc)
• A compromise is needed: SOPS
© 2019 InfluxData. All rights reserved.24
• Build nodes images with packer (region and cloud agnostic)
• Deploy VMs with Terraform
module’s input are equal for all cloud providers
• Configure auth, service discovery, node role and cloud using
custom binary in userdata
Our Solution
© 2019 InfluxData. All rights reserved.25
• 1 kubernetes cluster:
1 PKI secret engines
1 transit engine
1 KV engine
1 kubeadm-token plugin
Our Solution: Vault’s side
© 2019 InfluxData. All rights reserved.26
• Certificates are expected to be on disk
• No automatic reload of new certificates
• Service Account token signing without external provider
• Built-in certificate signing still require private/public key on
disk
• How to authenticate on-prem nodes? appRole?
Kubernetes is not perfect yet
© 2019 InfluxData. All rights reserved.27
[[inputs.x509_cert]]
sources = [
"/etc/kubernetes/pki/ca.crt",
"/etc/kubernetes/pki/front-proxy-ca.crt",
"/etc/kubernetes/pki/front-proxy-client.crt",
"/etc/kubernetes/pki/etcd/ca.crt",
"/etc/kubernetes/pki/etcd/peer.crt",
"/etc/kubernetes/pki/etcd/healthcheck-client.crt",
"/etc/kubernetes/pki/etcd/server.crt",
"/etc/kubernetes/pki/apiserver.crt",
"/etc/kubernetes/pki/apiserver-kubelet-client.crt",
"/etc/kubernetes/pki/apiserver-etcd-client.crt",
]
Monitoring Certifcates with Telegraf
© 2019 InfluxData. All rights reserved.28
DEMO
© 2019 InfluxData. All rights reserved.29
RECAP
• Let’s go and automate everything: don’t be scared!
• Vault can be integrated in critical application deployments
• Having a single source for auditing all your infrastructural
credentials is amazing
We’re hiring!!
@gitirabassi

More Related Content

PPTX
NGINX Lunch and Learn Event: Kubernetes and the NGINX Plus Ingress controller
PDF
How to Gain Real-Time Visibility into Your IaaS with vBridge, InfluxDB, Grafana
PDF
Control Kubernetes Ingress and Egress Together with NGINX
PDF
How to Use InfluxDB to Visualize and Monitor MQTT Messages in an IIoT System
PDF
Kubernetes and the NGINX Plus Ingress Controller
PDF
HiveMQ Webinar: Lightweight and scalable IoT Messaging with MQTT
PDF
VietOpenStack meetup 7th Kilo overview
PDF
FIWARE Global Summit - Building Your Own IoT Agent
NGINX Lunch and Learn Event: Kubernetes and the NGINX Plus Ingress controller
How to Gain Real-Time Visibility into Your IaaS with vBridge, InfluxDB, Grafana
Control Kubernetes Ingress and Egress Together with NGINX
How to Use InfluxDB to Visualize and Monitor MQTT Messages in an IIoT System
Kubernetes and the NGINX Plus Ingress Controller
HiveMQ Webinar: Lightweight and scalable IoT Messaging with MQTT
VietOpenStack meetup 7th Kilo overview
FIWARE Global Summit - Building Your Own IoT Agent

What's hot (20)

PDF
Cloud Native Day: Cloud-native Anwendungsentwicklung im Jahr 2021
PDF
API Gateway Use Cases​ for Kubernetes​
PDF
FIWARE Global Summit - Connecting to IoT
PDF
Azure Meetup Hamburg: Production-Ready Terraform Deployments on Azure
PDF
Centralizing Kubernetes Management in Restrictive Environments
PDF
Microservice API Gateways with NGINX
PPTX
Production-Grade Kubernetes With NGINX Ingress Controller
PDF
GitLab Commit DevOps: How GitLab Can Save your Kubernetes environment from Be...
PDF
Build your First IoT Application with IBM Watson IoT
PDF
Building Scalable & Reliable MQTT Clients for Enterprise Computing
PDF
Hyperledger Cello Feb 20, 2018
PDF
Microservice et identité
PDF
DevOpsCon Berlin: Helm vs Operators – Do I Need to Decide?
PDF
DevOpsCon London: How containerized Pipelines can boost your CI/CD
PDF
Docker Rosenheim Meetup: Policy & Governance for Kubernetes
PDF
Hyperledger Fabric EVM Integration Feb 20, 2018
PDF
DevOps Gathering - How Containerized Pipelines Can Boost Your CI/CD
PDF
A pure Java MQTT Stack for IoT
PPTX
An Open-Source Platform to Connect, Manage, and Secure Microservices
PDF
Azure Rosenheim Meetup: Azure Service Operator
Cloud Native Day: Cloud-native Anwendungsentwicklung im Jahr 2021
API Gateway Use Cases​ for Kubernetes​
FIWARE Global Summit - Connecting to IoT
Azure Meetup Hamburg: Production-Ready Terraform Deployments on Azure
Centralizing Kubernetes Management in Restrictive Environments
Microservice API Gateways with NGINX
Production-Grade Kubernetes With NGINX Ingress Controller
GitLab Commit DevOps: How GitLab Can Save your Kubernetes environment from Be...
Build your First IoT Application with IBM Watson IoT
Building Scalable & Reliable MQTT Clients for Enterprise Computing
Hyperledger Cello Feb 20, 2018
Microservice et identité
DevOpsCon Berlin: Helm vs Operators – Do I Need to Decide?
DevOpsCon London: How containerized Pipelines can boost your CI/CD
Docker Rosenheim Meetup: Policy & Governance for Kubernetes
Hyperledger Fabric EVM Integration Feb 20, 2018
DevOps Gathering - How Containerized Pipelines Can Boost Your CI/CD
A pure Java MQTT Stack for IoT
An Open-Source Platform to Connect, Manage, and Secure Microservices
Azure Rosenheim Meetup: Azure Service Operator
Ad

Similar to Troubles in Kubernetes Land: Vault to the Rescue (20)

PDF
Manage your bare-metal infrastructure with a CI/CD-driven approach
PDF
Securing k8s With Kubernetes Goat
PPTX
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
PDF
Managing Kubernetes operating Kubernetes clusters in the real world First Edi...
PPTX
DevSecOps in a cloudnative world
PPTX
10 tips for Cloud Native Security
PDF
JDO 2019: What you should be aware of before setting up kubernetes on premise...
PDF
Download full Managing Kubernetes operating Kubernetes clusters in the real w...
PPTX
Kubernetes Security
PDF
Successful K8S Platforms in Airgapped Environments
PDF
Kubernetes the Very Hard Way. Lisa Portland 2019
PDF
Security pitfalls in script-able infrastructure pipelines.
PDF
The Art of Cloud Native Defense on Kubernetes
PDF
Kubernetes the Very Hard Way. Velocity Berlin 2019
PPTX
Kubernetes security with AWS
PDF
Kubernetes 101 for_penetration_testers_-_null_mumbai
PDF
ultimate guide to kubernetes deployment.pdf
PPTX
Learn How to Use a Time Series Platform to Monitor All Aspects of Your Kubern...
PDF
Openstack In Action 1st Edition V K Cody Bumgardner
PDF
Managing Cloud Native Data On Kubernetes 1st Early Release Jeff Carpenter Pat...
Manage your bare-metal infrastructure with a CI/CD-driven approach
Securing k8s With Kubernetes Goat
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
Managing Kubernetes operating Kubernetes clusters in the real world First Edi...
DevSecOps in a cloudnative world
10 tips for Cloud Native Security
JDO 2019: What you should be aware of before setting up kubernetes on premise...
Download full Managing Kubernetes operating Kubernetes clusters in the real w...
Kubernetes Security
Successful K8S Platforms in Airgapped Environments
Kubernetes the Very Hard Way. Lisa Portland 2019
Security pitfalls in script-able infrastructure pipelines.
The Art of Cloud Native Defense on Kubernetes
Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes security with AWS
Kubernetes 101 for_penetration_testers_-_null_mumbai
ultimate guide to kubernetes deployment.pdf
Learn How to Use a Time Series Platform to Monitor All Aspects of Your Kubern...
Openstack In Action 1st Edition V K Cody Bumgardner
Managing Cloud Native Data On Kubernetes 1st Early Release Jeff Carpenter Pat...
Ad

More from DevOps.com (20)

PDF
Modernizing on IBM Z Made Easier With Open Source Software
PPTX
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
PPTX
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
PDF
Next Generation Vulnerability Assessment Using Datadog and Snyk
PPTX
Vulnerability Discovery in the Cloud
PDF
2021 Open Source Governance: Top Ten Trends and Predictions
PDF
A New Year’s Ransomware Resolution
PPTX
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
PDF
Don't Panic! Effective Incident Response
PDF
Creating a Culture of Chaos: Chaos Engineering Is Not Just Tools, It's Culture
PDF
Role Based Access Controls (RBAC) for SSH and Kubernetes Access with Teleport
PDF
Monitoring Serverless Applications with Datadog
PDF
Deliver your App Anywhere … Publicly or Privately
PPTX
Securing medical apps in the age of covid final
PDF
How to Build a Healthy On-Call Culture
PPTX
The Evolving Role of the Developer in 2021
PDF
Service Mesh: Two Big Words But Do You Need It?
PPTX
Secure Data Sharing in OpenShift Environments
PPTX
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
PDF
Elevate Your Enterprise Python and R AI, ML Software Strategy with Anaconda T...
Modernizing on IBM Z Made Easier With Open Source Software
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
Next Generation Vulnerability Assessment Using Datadog and Snyk
Vulnerability Discovery in the Cloud
2021 Open Source Governance: Top Ten Trends and Predictions
A New Year’s Ransomware Resolution
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
Don't Panic! Effective Incident Response
Creating a Culture of Chaos: Chaos Engineering Is Not Just Tools, It's Culture
Role Based Access Controls (RBAC) for SSH and Kubernetes Access with Teleport
Monitoring Serverless Applications with Datadog
Deliver your App Anywhere … Publicly or Privately
Securing medical apps in the age of covid final
How to Build a Healthy On-Call Culture
The Evolving Role of the Developer in 2021
Service Mesh: Two Big Words But Do You Need It?
Secure Data Sharing in OpenShift Environments
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
Elevate Your Enterprise Python and R AI, ML Software Strategy with Anaconda T...

Recently uploaded (20)

PDF
STKI Israel Market Study 2025 version august
PDF
CloudStack 4.21: First Look Webinar slides
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Hybrid model detection and classification of lung cancer
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Unlock new opportunities with location data.pdf
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Hindi spoken digit analysis for native and non-native speakers
PPT
What is a Computer? Input Devices /output devices
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPT
Geologic Time for studying geology for geologist
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
August Patch Tuesday
STKI Israel Market Study 2025 version august
CloudStack 4.21: First Look Webinar slides
Module 1.ppt Iot fundamentals and Architecture
NewMind AI Weekly Chronicles – August ’25 Week III
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Assigned Numbers - 2025 - Bluetooth® Document
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Hybrid model detection and classification of lung cancer
1 - Historical Antecedents, Social Consideration.pdf
O2C Customer Invoices to Receipt V15A.pptx
Unlock new opportunities with location data.pdf
Getting started with AI Agents and Multi-Agent Systems
Hindi spoken digit analysis for native and non-native speakers
What is a Computer? Input Devices /output devices
Final SEM Unit 1 for mit wpu at pune .pptx
Geologic Time for studying geology for geologist
Enhancing emotion recognition model for a student engagement use case through...
August Patch Tuesday

Troubles in Kubernetes Land: Vault to the Rescue

  • 1. Troubles in Kubernetes Land: Vault to the Rescue Webinar devops.com November 2019
  • 2. © 2019 InfluxData. All rights reserved.2 @gitirabassi Giacomo Tirabassi InfluxData SRE 󾓩 Italian ☸ Kubernetes in production since v1.8 🍝 love to cook and eat 󾓦 lived 1 year in Memphis 󾓭 lived 1 year in Shanghai
  • 3. © 2019 InfluxData. All rights reserved.3
  • 4. © 2019 InfluxData. All rights reserved.4 What’s the problem?
  • 5. © 2019 InfluxData. All rights reserved.5
  • 6. © 2019 InfluxData. All rights reserved.6 Solution: use a managed kubernetes solution
  • 7. © 2019 InfluxData. All rights reserved.7
  • 8. © 2019 InfluxData. All rights reserved.8 A little bit of context • Multiple clusters • Multiple regions • Multiple cloud (also on-prem) • Minimal operational effort • Maximum automation
  • 9. © 2019 InfluxData. All rights reserved.9
  • 10. © 2019 InfluxData. All rights reserved.10 Kubernetes is just an application a critical one
  • 11. © 2019 InfluxData. All rights reserved.11 Automation: a little digression Stateless applications (easy) Stateful applications (hard) Critical applications (he/she needs some milk)
  • 12. © 2019 InfluxData. All rights reserved.12 Automation: why so hard? • Credentials go from long lived to short lived • How to observe? • How to test? • How to rollback? or rollforward? • What can go wrong? and how to deal with it? IMMUTABLE INFRASTRUCTURE
  • 13. © 2019 InfluxData. All rights reserved.13 When deploying Kubernetes yourself • Manage Etcd • Manage PKI • Manage Nodes • Upgrade Controlplane + Nodes • Update configurations • DR / BC
  • 14. © 2019 InfluxData. All rights reserved.14 What can go wrong? • 2 out of 5 of the HIGH risk are TLS related • certificate expiration is an issue • ETCD data dump is underestimate • certificates and keys can be accessed on the master node if PSP are not turned on
  • 15. © 2019 InfluxData. All rights reserved.15 How can vault help?
  • 16. © 2019 InfluxData. All rights reserved.16 Two parties needs access to Vault • Human LDAP OIDC • Nodes aws gcp azure alicloud
  • 17. © 2019 InfluxData. All rights reserved.17 Humans need to SSH into nodes • SSH Secret Engine: using Signed Keys can be as simple as • vault login -method=oidc • vault ssh -mode=ca ubuntu@192.168.0.10
  • 18. © 2019 InfluxData. All rights reserved.18 Humans need access to K8S • Identity secret engine is OIDC compatible • added in v1.2.0 • very customizable id_token content • automatic key rotation
  • 19. © 2019 InfluxData. All rights reserved.19 3 types of nodes and policies • Etcd nodes • Control plane nodes • Worker nodes
  • 20. © 2019 InfluxData. All rights reserved.20 Etcd nodes • Need access to ETCD server and peer certificates • PKI Secret Engine is made for this
  • 21. © 2019 InfluxData. All rights reserved.21 Control Plane nodes • Need access to ETCD client certificates • Need access to APIs CA • Need access to front-proxy CA • Service Account private/public keys (sign/verify JWT tokens) • Needs access to Vault Transit backend to encrypt data in etcd
  • 22. © 2019 InfluxData. All rights reserved.22 Worker nodes • Need access to Kubeadm Join Token Custom secret engine plugin When a node needs access creates a short-lived token on kubernetes Token validity can be configured, but 1 minute is default • Needs access to kubelet server certificates by default kubelet uses self-signed ones
  • 23. © 2019 InfluxData. All rights reserved.23 Static secrets • Migrations are hard • For long lived secrets (eg. TLS certificates, api keys, etc) • A compromise is needed: SOPS
  • 24. © 2019 InfluxData. All rights reserved.24 • Build nodes images with packer (region and cloud agnostic) • Deploy VMs with Terraform module’s input are equal for all cloud providers • Configure auth, service discovery, node role and cloud using custom binary in userdata Our Solution
  • 25. © 2019 InfluxData. All rights reserved.25 • 1 kubernetes cluster: 1 PKI secret engines 1 transit engine 1 KV engine 1 kubeadm-token plugin Our Solution: Vault’s side
  • 26. © 2019 InfluxData. All rights reserved.26 • Certificates are expected to be on disk • No automatic reload of new certificates • Service Account token signing without external provider • Built-in certificate signing still require private/public key on disk • How to authenticate on-prem nodes? appRole? Kubernetes is not perfect yet
  • 27. © 2019 InfluxData. All rights reserved.27 [[inputs.x509_cert]] sources = [ "/etc/kubernetes/pki/ca.crt", "/etc/kubernetes/pki/front-proxy-ca.crt", "/etc/kubernetes/pki/front-proxy-client.crt", "/etc/kubernetes/pki/etcd/ca.crt", "/etc/kubernetes/pki/etcd/peer.crt", "/etc/kubernetes/pki/etcd/healthcheck-client.crt", "/etc/kubernetes/pki/etcd/server.crt", "/etc/kubernetes/pki/apiserver.crt", "/etc/kubernetes/pki/apiserver-kubelet-client.crt", "/etc/kubernetes/pki/apiserver-etcd-client.crt", ] Monitoring Certifcates with Telegraf
  • 28. © 2019 InfluxData. All rights reserved.28 DEMO
  • 29. © 2019 InfluxData. All rights reserved.29 RECAP • Let’s go and automate everything: don’t be scared! • Vault can be integrated in critical application deployments • Having a single source for auditing all your infrastructural credentials is amazing