SlideShare a Scribd company logo
Zero-Configuration Pattern
Provisioning Kubernetes on Unmanaged Infrastructure
Rob @zehicle Hirschfeld, RackN
November, 2017
Hang on to your Hats!
Krazy New Stuff
● Immutable Bootstrap
(demo!)
● Node Admission (v1.7)
● Dynamic Kubelet (v1.8)
3
#KubeCon - @zehicle
Rob Hirschfeld (@zehicle)
Involved in Kubernetes since launch
Co-chair of Cluster Ops SIG
Co-Founder of RackN & Digital Rebar Project
We focus on operations automation for bare metal
4
#KubeCon - @zehicle
We’ve been using Kubespray since Kubernetes v1.2
But first… Kubespray
● Very Solid Ansible Playbook
● Strong Community
● Amazing Features like HA & Upgrade
HTTP://bit.ly/SYDkubespray
But….
5
#KubeCon - @zehicle
Why not Kubespray?
We’d like to do better!
● No Centralized Orchestration
● No Inventory Building
● No SSH
● Immutable Booting
● and, much FASTER
I don’t always Ansible, but when I do Ansible, I use Kubespray.
6
#KubeCon - @zehicle
Let’s get Immutable!
What?
● Create, Destroy & Repeat
● Machines recreated, not updated
● Typically “Pre-Baked” images
Why?
● Very repeatable and predictable installation
● Simpler node configuration
● Faster deploy time
7
#KubeCon - @zehicle
Community converging to single install utility!
Leveraging Kubeadm
Basic Three Step Cluster Initialization:
1. Initialize Master
2. Retrieve Token from Initialize
3. Join Nodes with Token
Still requires coordination / synchronization
8
#KubeCon - @zehicle
We need to build underlay infrastructure
But First, Kubeadm Prereqs
Basic Three Step Underlay:
1. install operating system
with network access
2. attach disks (optional?!)
3. install Docker on the machine
Oh, and we need to have some control
mechanism on the nodes too.
9
#KubeCon - @zehicle
A bootstrapping illustration
node01 node02 node03 node04
10
#KubeCon - @zehicle
A bootstrapping illustration
Install
O/S
Install
Docker
Install
O/S
Install
Docker
1
2
Install
O/S
Install
Docker
Install
O/S
Install
Docker
node01 node02 node03 node04
Install Stage
11
#KubeCon - @zehicle
A bootstrapping illustration
Install
O/S
Install
Docker
Kubeadm
-- Init
Cluster
Token
Install
O/S
Install
Docker
1
2
3
4
Install
O/S
Install
Docker
Install
O/S
Install
Docker
node01 node02 node03 node04
master node
(random or selected)
12
#KubeCon - @zehicle
A bootstrapping illustration
Install
O/S
Install
Docker
Kubeadm
-- Init
Cluster
Token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
1
2
3
4 5
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
node01 node02 node03 node04
13
#KubeCon - @zehicle
Later...
A bootstrapping illustration
Install
O/S
Install
Docker
Kubeadm
-- Init
Cluster
Token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
1
2
3
4 5
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
node01 node02 node03 node04 nodeN
14
#KubeCon - @zehicle
A bootstrapping illustration
Install
O/S
Install
Docker
Kubeadm
-- Init
Cluster
Token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
1
2
3
4 5
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
Install
O/S
Install
Docker
Kubeadm
-- Join
wait for
token
node01 node02 node03 node04 nodeN
PSA: THIS IS NOT A NEW INSTALLER
At RackN, we push back against the distro
installer wars (ala OpenStack).
We believe that Kubernetes install tooling
should be a shared community investment.
Demo!
Kubeadm
Rebar
Immutable
Bootstrap
Pretty Cool! But...
There is more to do
● Adding Nodes requires Token
● Adding Kubelet requires Configuration
● Cluster API (Orchestrating Update)
18
#KubeCon - @zehicle
Benefits!
1. Immutable Configuration
2. Auto Scaling
3. Faster Node Install
4. Centralized Configuration of Cluster
5. Coordinated Upgrades
Still requires coordination / synchronization
https://kubernetes.io/docs/admin/admission-controllers/
Node Admission
19
#KubeCon - @zehicle
NOT Node specific!
Admission control provides an API
mechanism to block creation of new
objects.
In this case, Admission would allow an
external system to validate that new
nodes are known and trusted.
HSM: Hardware Signing Module
Node Admission
Kubelet
API Server
External
Node
Validation
1 Install
2Create
3 Confirm
5Allow
4 Verify
20
#KubeCon - @zehicle
HSM: Hardware Signing Module
Node Admission with HSM
Kubelet
API Server
External
Node
Validation
1 Install
2Create
3 Confirm
5Allow
4 Verify
PKI
A Pass Token B Encrypt Token
Encrypted
Token
E Encrypted
Token
FEncrypted
Token
GVerfiy
HSM ensures unique
identy of machine by
signing secret token.
Only token creater
(PKI) and machine know
the secret. API Server
cannot read or validate
internally.
C Public Key
21
#KubeCon - @zehicle
Frankly, RackN is on the fence.
If injecting a join cluster token
then the external system has
already verified the new node.
Is Node Admission Needed?
22
#KubeCon - @zehicle
https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/
Kubelet Dynamic Configuration
We want to eliminate external configuration tools.
Kubernetes is already a system configuration database!
Can’t we just use that capability to bootstrap the system?
Then we have fewer tools to learn and managed!
(IMHO, this is known as a the bootstrap fallacy)
23
#KubeCon - @zehicle
Ideally, it would be like this...
1. Centrally Configurate
2. Install Kubelet
3. Allow Kubelet to Register
4. Kubelet Configures itself
Kubelet2 Install
3Reg
4Config
API Server1 Config
24
#KubeCon - @zehicle
https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/
Kubelet Dynamic Configuration
1. Install Node and Kubelet
2. Configure Kubelet
3. Allow Kubelet to Register
4. Register Configuration in API
5. Reconfigure Kubelet to use
configuration from API
6. Manage configuration from API
Kubelet
1 Install
3Reg
6Config
API Server
2 Config
4 Config
5 ReConfig
25
#KubeCon - @zehicle
Frankly, RackN is on the fence.
Since we have to boostrap a node
with some configuration, there is
not much difference between
some and all configuration.
We have not eliminated
configuration.
Is Dynamic Configuration Needed?
We’re Making Great Progress!
We can automatically
bootstrap a cluster
using open community
tools with minimal
configuration.
And we have room to improve.
Thank you
Join In! http://rebar.digital
Follow:
● Rob Hirschfeld > @zehicle
● RackN > @rackngo
● Digital Rebar > @digitalrebar
● Cluster Ops SIG > http://bit.ly/k8sclops

More Related Content

PDF
Kubecon 2017 Zero Touch Kubernetes
PDF
#SREcon Immutable Infrastructure: rethinking configuration mgmt
PDF
Continuous Deployment with Jenkins on Kubernetes
PPTX
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
PDF
Building kubectl plugins with Quarkus | DevNation Tech Talk
PPTX
Zero to Continuous Delivery on Google Cloud
PDF
Git deep dive – chopping Kubernetes
PDF
Kubelet with no Kubernetes Masters | DevNation Tech Talk
Kubecon 2017 Zero Touch Kubernetes
#SREcon Immutable Infrastructure: rethinking configuration mgmt
Continuous Deployment with Jenkins on Kubernetes
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Building kubectl plugins with Quarkus | DevNation Tech Talk
Zero to Continuous Delivery on Google Cloud
Git deep dive – chopping Kubernetes
Kubelet with no Kubernetes Masters | DevNation Tech Talk

What's hot (20)

PDF
Extend and build on Kubernetes
PDF
Achieving CI/CD with Kubernetes
PDF
Container Days Boston - Kubernetes in production
PDF
Cantainer CI/ CD with Kubernetes
PDF
Kubernetes Architecture - beyond a black box - Part 2
PPTX
Tectonic Summit 2016: The Origins of Kubernetes
PDF
Cutting the Kubernetes Monorepo in pieces – never learnt more about git
PDF
Using Libvirt with Cluster API to manage baremetal Kubernetes
PDF
Kube-AWS
PPTX
Scaling jenkins with kubernetes
PDF
Bosh 2-0-reloaded
PDF
Deep dive in container service discovery
PDF
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
PDF
How to integrate Kubernetes in OpenStack: You need to know these project
PPTX
Managing Docker Containers In A Cluster - Introducing Kubernetes
PDF
Beyond static configuration
PDF
Git 101: Git and GitHub for Beginners
PDF
Extending kubernetes with CustomResourceDefinitions
PPTX
How Kubernetes scheduler works
Extend and build on Kubernetes
Achieving CI/CD with Kubernetes
Container Days Boston - Kubernetes in production
Cantainer CI/ CD with Kubernetes
Kubernetes Architecture - beyond a black box - Part 2
Tectonic Summit 2016: The Origins of Kubernetes
Cutting the Kubernetes Monorepo in pieces – never learnt more about git
Using Libvirt with Cluster API to manage baremetal Kubernetes
Kube-AWS
Scaling jenkins with kubernetes
Bosh 2-0-reloaded
Deep dive in container service discovery
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
How to integrate Kubernetes in OpenStack: You need to know these project
Managing Docker Containers In A Cluster - Introducing Kubernetes
Beyond static configuration
Git 101: Git and GitHub for Beginners
Extending kubernetes with CustomResourceDefinitions
How Kubernetes scheduler works
Ad

Similar to KubeCon 2017 Zero Touch Provision (20)

PDF
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
PDF
From Kubernetes to OpenStack in Sydney
PDF
The App Developer's Kubernetes Toolbox
PDF
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
PPTX
Helm and the zen of managing complex Kubernetes apps
PDF
Day 2 Kubernetes - Tools for Operability (KubeCon)
PDF
Kubernetes for java developers - Tutorial at Oracle Code One 2018
PDF
Deploying on Kubernetes - An intro
PPTX
K8s in 3h - Kubernetes Fundamentals Training
PPTX
A Million ways of Deploying a Kubernetes Cluster
PDF
Kubernetes for Java Developers
PDF
David Steiman - Getting serious with private kubernetes clusters & cloud nati...
PPTX
Simplify Your Way To Expert Kubernetes Management
PPTX
A brief study on Kubernetes and its components
PPTX
Kubernetes Manchester - 6th December 2018
PPTX
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
PPTX
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
PDF
Container orchestration k8s azure kubernetes services
PPTX
Container Conf 2017: Rancher Kubernetes
PDF
Containers, orchestration and security, oh my!
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
From Kubernetes to OpenStack in Sydney
The App Developer's Kubernetes Toolbox
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
Helm and the zen of managing complex Kubernetes apps
Day 2 Kubernetes - Tools for Operability (KubeCon)
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Deploying on Kubernetes - An intro
K8s in 3h - Kubernetes Fundamentals Training
A Million ways of Deploying a Kubernetes Cluster
Kubernetes for Java Developers
David Steiman - Getting serious with private kubernetes clusters & cloud nati...
Simplify Your Way To Expert Kubernetes Management
A brief study on Kubernetes and its components
Kubernetes Manchester - 6th December 2018
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Container orchestration k8s azure kubernetes services
Container Conf 2017: Rancher Kubernetes
Containers, orchestration and security, oh my!
Ad

More from RackN (12)

PDF
Immutable Infrastructure & Rethinking Configuration - Interop 2019
PDF
Digital Rebar Community Welcome Guide
PDF
Immutable Deployment Hands-On Lab Interop ITX
PDF
Composable Infrastructure Talk at Interop ITX 2018
PDF
SRECon 18 Immutable Infrastructure
PDF
Immutable infrastructure & Rethinking Configuration
PDF
Immutable infrastructure & Rethinking Configuration
PDF
Immutable Kubernetes with Digital Rebar Provision
PDF
RackN Company Overview
PDF
Operational Improvement Issues, Impacts and Solution from RackN
PDF
Data Center’s Last Mile: Zero Touch Metal Automation
PDF
DevOps vs SRE vs Cloud Native
Immutable Infrastructure & Rethinking Configuration - Interop 2019
Digital Rebar Community Welcome Guide
Immutable Deployment Hands-On Lab Interop ITX
Composable Infrastructure Talk at Interop ITX 2018
SRECon 18 Immutable Infrastructure
Immutable infrastructure & Rethinking Configuration
Immutable infrastructure & Rethinking Configuration
Immutable Kubernetes with Digital Rebar Provision
RackN Company Overview
Operational Improvement Issues, Impacts and Solution from RackN
Data Center’s Last Mile: Zero Touch Metal Automation
DevOps vs SRE vs Cloud Native

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
August Patch Tuesday
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Tartificialntelligence_presentation.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
project resource management chapter-09.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
1. Introduction to Computer Programming.pptx
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
Hybrid model detection and classification of lung cancer
A comparative analysis of optical character recognition models for extracting...
August Patch Tuesday
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Zenith AI: Advanced Artificial Intelligence
Tartificialntelligence_presentation.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
project resource management chapter-09.pdf
A novel scalable deep ensemble learning framework for big data classification...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Chapter 5: Probability Theory and Statistics
SOPHOS-XG Firewall Administrator PPT.pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
OMC Textile Division Presentation 2021.pptx
NewMind AI Weekly Chronicles - August'25-Week II
1. Introduction to Computer Programming.pptx
Heart disease approach using modified random forest and particle swarm optimi...
Approach and Philosophy of On baking technology

KubeCon 2017 Zero Touch Provision

  • 1. Zero-Configuration Pattern Provisioning Kubernetes on Unmanaged Infrastructure Rob @zehicle Hirschfeld, RackN November, 2017
  • 2. Hang on to your Hats! Krazy New Stuff ● Immutable Bootstrap (demo!) ● Node Admission (v1.7) ● Dynamic Kubelet (v1.8)
  • 3. 3 #KubeCon - @zehicle Rob Hirschfeld (@zehicle) Involved in Kubernetes since launch Co-chair of Cluster Ops SIG Co-Founder of RackN & Digital Rebar Project We focus on operations automation for bare metal
  • 4. 4 #KubeCon - @zehicle We’ve been using Kubespray since Kubernetes v1.2 But first… Kubespray ● Very Solid Ansible Playbook ● Strong Community ● Amazing Features like HA & Upgrade HTTP://bit.ly/SYDkubespray But….
  • 5. 5 #KubeCon - @zehicle Why not Kubespray? We’d like to do better! ● No Centralized Orchestration ● No Inventory Building ● No SSH ● Immutable Booting ● and, much FASTER I don’t always Ansible, but when I do Ansible, I use Kubespray.
  • 6. 6 #KubeCon - @zehicle Let’s get Immutable! What? ● Create, Destroy & Repeat ● Machines recreated, not updated ● Typically “Pre-Baked” images Why? ● Very repeatable and predictable installation ● Simpler node configuration ● Faster deploy time
  • 7. 7 #KubeCon - @zehicle Community converging to single install utility! Leveraging Kubeadm Basic Three Step Cluster Initialization: 1. Initialize Master 2. Retrieve Token from Initialize 3. Join Nodes with Token Still requires coordination / synchronization
  • 8. 8 #KubeCon - @zehicle We need to build underlay infrastructure But First, Kubeadm Prereqs Basic Three Step Underlay: 1. install operating system with network access 2. attach disks (optional?!) 3. install Docker on the machine Oh, and we need to have some control mechanism on the nodes too.
  • 9. 9 #KubeCon - @zehicle A bootstrapping illustration node01 node02 node03 node04
  • 10. 10 #KubeCon - @zehicle A bootstrapping illustration Install O/S Install Docker Install O/S Install Docker 1 2 Install O/S Install Docker Install O/S Install Docker node01 node02 node03 node04 Install Stage
  • 11. 11 #KubeCon - @zehicle A bootstrapping illustration Install O/S Install Docker Kubeadm -- Init Cluster Token Install O/S Install Docker 1 2 3 4 Install O/S Install Docker Install O/S Install Docker node01 node02 node03 node04 master node (random or selected)
  • 12. 12 #KubeCon - @zehicle A bootstrapping illustration Install O/S Install Docker Kubeadm -- Init Cluster Token Install O/S Install Docker Kubeadm -- Join wait for token 1 2 3 4 5 Install O/S Install Docker Kubeadm -- Join wait for token Install O/S Install Docker Kubeadm -- Join wait for token node01 node02 node03 node04
  • 13. 13 #KubeCon - @zehicle Later... A bootstrapping illustration Install O/S Install Docker Kubeadm -- Init Cluster Token Install O/S Install Docker Kubeadm -- Join wait for token 1 2 3 4 5 Install O/S Install Docker Kubeadm -- Join wait for token Install O/S Install Docker Kubeadm -- Join wait for token Install O/S Install Docker Kubeadm -- Join wait for token node01 node02 node03 node04 nodeN
  • 14. 14 #KubeCon - @zehicle A bootstrapping illustration Install O/S Install Docker Kubeadm -- Init Cluster Token Install O/S Install Docker Kubeadm -- Join wait for token 1 2 3 4 5 Install O/S Install Docker Kubeadm -- Join wait for token Install O/S Install Docker Kubeadm -- Join wait for token Install O/S Install Docker Kubeadm -- Join wait for token node01 node02 node03 node04 nodeN
  • 15. PSA: THIS IS NOT A NEW INSTALLER At RackN, we push back against the distro installer wars (ala OpenStack). We believe that Kubernetes install tooling should be a shared community investment.
  • 17. Pretty Cool! But... There is more to do ● Adding Nodes requires Token ● Adding Kubelet requires Configuration ● Cluster API (Orchestrating Update)
  • 18. 18 #KubeCon - @zehicle Benefits! 1. Immutable Configuration 2. Auto Scaling 3. Faster Node Install 4. Centralized Configuration of Cluster 5. Coordinated Upgrades Still requires coordination / synchronization https://kubernetes.io/docs/admin/admission-controllers/ Node Admission
  • 19. 19 #KubeCon - @zehicle NOT Node specific! Admission control provides an API mechanism to block creation of new objects. In this case, Admission would allow an external system to validate that new nodes are known and trusted. HSM: Hardware Signing Module Node Admission Kubelet API Server External Node Validation 1 Install 2Create 3 Confirm 5Allow 4 Verify
  • 20. 20 #KubeCon - @zehicle HSM: Hardware Signing Module Node Admission with HSM Kubelet API Server External Node Validation 1 Install 2Create 3 Confirm 5Allow 4 Verify PKI A Pass Token B Encrypt Token Encrypted Token E Encrypted Token FEncrypted Token GVerfiy HSM ensures unique identy of machine by signing secret token. Only token creater (PKI) and machine know the secret. API Server cannot read or validate internally. C Public Key
  • 21. 21 #KubeCon - @zehicle Frankly, RackN is on the fence. If injecting a join cluster token then the external system has already verified the new node. Is Node Admission Needed?
  • 22. 22 #KubeCon - @zehicle https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/ Kubelet Dynamic Configuration We want to eliminate external configuration tools. Kubernetes is already a system configuration database! Can’t we just use that capability to bootstrap the system? Then we have fewer tools to learn and managed! (IMHO, this is known as a the bootstrap fallacy)
  • 23. 23 #KubeCon - @zehicle Ideally, it would be like this... 1. Centrally Configurate 2. Install Kubelet 3. Allow Kubelet to Register 4. Kubelet Configures itself Kubelet2 Install 3Reg 4Config API Server1 Config
  • 24. 24 #KubeCon - @zehicle https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/ Kubelet Dynamic Configuration 1. Install Node and Kubelet 2. Configure Kubelet 3. Allow Kubelet to Register 4. Register Configuration in API 5. Reconfigure Kubelet to use configuration from API 6. Manage configuration from API Kubelet 1 Install 3Reg 6Config API Server 2 Config 4 Config 5 ReConfig
  • 25. 25 #KubeCon - @zehicle Frankly, RackN is on the fence. Since we have to boostrap a node with some configuration, there is not much difference between some and all configuration. We have not eliminated configuration. Is Dynamic Configuration Needed?
  • 26. We’re Making Great Progress! We can automatically bootstrap a cluster using open community tools with minimal configuration. And we have room to improve.
  • 27. Thank you Join In! http://rebar.digital Follow: ● Rob Hirschfeld > @zehicle ● RackN > @rackngo ● Digital Rebar > @digitalrebar ● Cluster Ops SIG > http://bit.ly/k8sclops