Kubeadm Deep Dive (Kubecon Seattle 2018)

L
#kubeadm deep dive
Agenda
● Who?
● Mission
● GA
● Roadmap 2019
● Getting Involved
● Q/A
L
Who?
L
Who are we?
Timothy St. Clair
SIG Cluster Lifecycle co-lead
Steering Committee Member
Staff Engineer @Heptio/VMWare
@timothysc
Liz Frost
SIG Cluster Lifecycle Contributor
Kube Cuddle creator
SW Engineer @Heptio/VMWare
@liztio
Who are we?
● 100s of contributors across several companies
● Smaller core group of active maintainers
○ VMWare
■ Lubomir, Ross
○ VMWare (née Heptio)
■ Tim, Liz, Jason, Chuck
○ Suse
■ Marek, Rafael
○ Intel
■ Alex, Ed
○ Other/Independent
■ Luxas, Fabrizio, Yago, Di
● Large user community on #kubeadm
L
Mission
L
What is our mission?
SIG Cluster Lifecycle’s objective is to
simplify creation, configuration,
upgrade, downgrade, and teardown of
Kubernetes clusters and their
components.
L
<BRACE FOR RANT}
T
Why are we doing this?
● To prevent the mistakes of other open source cluster mgmt provisioning
tools
○ Because…
■ Kubernetes is the beginning of the story, not the end
■ commoditizing the deployment of the core raises all boats and
allows the community to focus on solving end user problems
■ “production grade” shouldn’t be firewalled by providers
■ It should “just work”
■ Because cross provider matters
● To make the management of (X) clusters across (Y) providers simple,
secure, and configurable.
T
Why (unix philosophy)?
● Make each program do one thing well. To do a new job, build afresh rather
than complicate old programs by adding new "features".
● Expect the output of every program to become the input to another, as yet
unknown, program. Don't clutter output with extraneous information.
Don't insist on interactive input.
● Design and build software, to be tried early, ideally within weeks. Don't
hesitate to throw away the clumsy parts and rebuild them.
● Use tools instead of people to lighten a programming task, even if you
have to detour to build the tools and expect to throw some of them out
after you've finished using them.
○ Write down the “Hard Way” and optimize 80% UX Flow with override
T
Key Design Takeaways
● kubeadm’s task is to set up a best-practice cluster for each minor version
● The user experience should be simple, and the cluster reasonably secure
● kubeadm’s scope is limited; intended to be a composable building block
○ Only ever deals with the local filesystem and the Kubernetes API
○ Agnostic to how exactly the kubelet is run
○ Setting up or favoring a specific CNI network is out of scope
● Composable architecture with everything divided into phases
● Versioned configuration
T
Component View
Master 1 Master N Node 1 Node N
kubeadm kubeadm kubeadm kubeadm
Cloud Provider Load Balancers Monitoring Logging
Cluster API Spec
Cluster API Cluster API Implementation
Addons
Kubernetes API
Bootstrapping
Machines
Infrastructure
Layer 2
The scope of kubeadm
Layer 3
Layer 1
Kubeadm is GA!!!
What does GA mean?
● Stable command-line UX — The kubeadm CLI conforms to #5a GA rule of the Kubernetes
Deprecation Policy, which states that a command or flag that exists in a GA version must
be kept for at least 12 months after deprecation.
○ init/join/upgrade/config/reset/token/version
● Stable underlying implementation — kubeadm now creates a new Kubernetes cluster
using methods that shouldn’t change any time soon. The control plane, for example, is
run as a set of static Pods, bootstrap tokens are used for the kubeadm join flow, and
ComponentConfig is used for configuring the kubelet.
● Upgrades between minor versions — The kubeadm upgrade command is now fully GA. It
handles control plane upgrades for you, which includes upgrades to etcd, the API Server,
the Controller Manager, and the Scheduler. You can seamlessly upgrade your cluster
between minor or patch versions (e.g. v1.12.2 -> v1.13.1 or v1.13.1 -> v1.13.3).
T
What does GA mean?
● Configuration file schema — With the new v1beta1 API version, you can now tune almost
every part of the cluster declaratively and thus build a “GitOps” flow around
kubeadm-built clusters. In future versions, we plan to graduate the API to version v1 with
minimal changes (and perhaps none).
○ Examples and references are now in standard Godoc format
○ Config is split into parts
■ InitConfiguration
■ ClusterConfiguration - stored on cluster in a configmap
■ JoinConfiguration
L
kubeadm: InitConfiguration
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
localAPIEndpoint:
advertiseAddress: "10.100.0.1"
bindPort: 6443
nodeRegistration:
criSocket: "/var/run/crio/crio.sock"
kubeletExtraArgs:
cgroupDriver: "cgroupfs"
bootstrapTokens:
...
• Usage
• “kubeadm init --config …”
• Why
• Custom API endpoint address
• Specify init bootstrap tokens
• Pass custom kubelet flags
• Set node name/taints
L
kubeadm: Cluster Configuration
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion: "v1.12.2"
imageRepository: registry.example.com
networking:
serviceSubnet: "10.96.0.0/12"
dnsDomain: "cluster.local"
etcd:
...
apiServer:
extraArgs:
...
extraVolumes:
...
• Usage
• “kubeadm init --config …”
• Why
• Fine tune cluster defaults
• Custom arguments and volume
mounts to control plane
components
L
What does GA mean?
● The “toolbox” interface of kubeadm — Also known as phases. If you don’t want to
perform all kubeadm init tasks, you can instead apply more fine-grained actions using the
kubeadm init phase command (for example generating certificates or control plane Static
Pod manifests).
○ Currently this only applies to `kubeadm init`
○ In 2019 - `kubeadm join phases`
● etcd setup — etcd is now set up in a way that is secure by default, with TLS
communication everywhere, and allows for expanding to a highly available cluster when
needed.
T
kubeadm: init phases
preflight Run pre-flight checks
kubelet-start Writes kubelet settings and (re)starts the kubelet
certs Generates certificates for a Kubernetes cluster
kubeconfig Generates all kubeconfig files for the control plane and the admin kubeconfig file
control-plane Generates all static Pod manifest files necessary to establish the control plane
etcd Generates static Pod manifest file for local etcd.
upload-config Uploads the currently used configuration for kubeadm to a ConfigMap
mark-control-plane Mark a node as a control-plane
bootstrap-token Manage kubeadm-specific bootstrap token functions
addon Installs required addons for passing Conformance tests
T
kubeadm: init phases
Run
Preflight
Checks
Install
DNS and
Proxy
Addons
Setup the RBAC
Authorization
System
Taint and
label the
master
Upload
kubeadm &
kubelet
config to a
ConfigMap
Kubelet
Start
Wait for
the control
plane to
be healthy
Generate
static Pod
Manifests
for the
Control
Plane
Generate
Certificates
Generate
KubeConfig
Files
Generate a (by
default random)
Bootstrap Token
T
kubeadm joinkubeadm join
Preflight
Checks
Fetches
Init
Configuration
Run
Specific
Checks
base on the
Init
Configuration
Checks
if the Cluster
Configuration
Supports
Runs
Kubeadm
Init
Preflight
Check
Generates
static Pod
Manifests
for new
Control
Plane
Bootstraps
Kubelet
Uploading
Currently Used
InitConfiguration
Applies
Master
Label and
Taints
--experimental-control-plane
--experimental-control-plane
kubeadm upgrade: Control Plane
Preflight
Checks
Checks
if the
cluster
is
healthy
Gets the
configuration
from the
"kubeadm-config"
ConfigMap
Enforces
all
version
skew
policies
Upgrades
the
control
plane
Static
Pods
Upgrade
RBAC
rules and
addons
L
Certificate Management
etcd
kubelet
kubelet
API Server Proxied Pod Poduser
L
Certificate Management
● apiserver
● apiserver-kubelet-client
● front-proxy-client
● etcd-server
● etcd-peer
● etcd-healthcheck-client
● apiserver-etcd-client
● user certificates
L
Certificate Hierarchy
● root CA
○ apiserver
○ apiserver-kubelet-client
● front-proxy CA
○ front-proxy-client
● etcd CA
○ etcd-server
○ etcd-peer
○ etcd-healthcheck-client
○ apiserver-etcd-client
L
Certificate Hierarchy
● root CA
○ apiserver
○ apiserver-kubelet-client
● front-proxy CA
○ front-proxy-client
● etcd CA
○ etcd-server
○ etcd-peer
○ etcd-healthcheck-client
○ apiserver-etcd-client
root
CA
etcd
CA
front
proxy
CA
kube
client
api
server
etcd
server
etcd
peer
etcd
health
check
api
etcd
client
front
proxy
client
L
Certificate Generation
● From Scratch
root
CA
etcd
CA
front
proxy
CA
kube
client
api
server
etcd
server
etcd
peer
etcd
health
check
api
etcd
client
front
proxy
client
L
Certificate Generation
● From Scratch
● Provided CAs (+ keys) root
CA
etcd
CA
front
proxy
CA
kube
client
api
server
etcd
server
etcd
peer
etcd
health
check
api
etcd
client
front
proxy
client
L
Certificate Generation
● From Scratch
● Provided CAs (+ keys)
● All External (keys optional)
root
CA
etcd
CA
front
proxy
CA
kube
client
api
server
etcd
server
etcd
peer
etcd
health
check
api
etcd
client
front
proxy
client
L
Certificate Generation
● From Scratch
● Provided CAs (+ keys)
● All External (keys optional)
● Mixed
root
CA
etcd
CA
front
proxy
CA
kube
client
api
server
etcd
server
etcd
peer
etcd
health
check
api
etcd
client
front
proxy
client
L
Other Certificate Options
● Generate CSRs!
● `kubeadm alpha certs renew`
● Certificates API requests
L
2019 Roadmap
L
2019 Roadmap
● Config to v1
● HA to GA
○ Full test automation
● Continued promotion of alpha phases to subcommands
○ e.g. join phases
● Grand unified field theory on ComponentConfiguration
○ Working group being formed.
● Incorporate etcdadm and bundles when stable
● Test and release automation …
T
Testing and release tooling
T
2019 Roadmap - CI + Release
● CI
○ KIND as the only PR blocking job
○ Move all SCL jobs to periodics
○ CI = release artifacts
○ Kill `kubernetes-anywhere` with extreme prejudice
● Release
○ Move all package building into k/k
■ .deb/rpm build artifacts
○ Keep signing and publishing separate in the release repo
○ Work with k8s-infra team
■ Want -devel and -stable repos & registries
T
Getting Involved
http://bit.ly/kubeadm-survey
L
How can you contribute
● Contributing to SIG Cluster Lifecycle documentation
● We’re working on growing the contributor/reviewers pool; scaling the SIG
● We have “Office Hours” for our projects: weekly for kubeadm, bi-weekly for kops and
kubespray…
● Cluster API office hours weekly for both US West Coast and EMEA
● Full list of SIG meetings and links to minutes and recordings can be found on SIG page
● Attend our Zoom meetings / be around on Slack
● Look for “good first issue”, “help wanted” and “sig/cluster-lifecycle” labeled issues in
our repositories
L
Logistics
● Follow the SIG Cluster Lifecycle YouTube playlist
● Check out the meeting notes for our weekly office hours meetings
● Join #sig-cluster-lifecycle, #kubeadm channels
● Check out the kubeadm setup guide, reference doc and design doc
● Read how you can get involved and improve kubeadm!
L
Thank You!
Q/A
1 of 39

Recommended

2016 - Continuously Delivering Microservices in Kubernetes using Jenkins by
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
2016 - Continuously Delivering Microservices in Kubernetes using Jenkinsdevopsdaysaustin
2.3K views40 slides
Lessons learned from the charts repo by
Lessons learned from the charts repoLessons learned from the charts repo
Lessons learned from the charts repoVictor Iglesias
442 views63 slides
Effective Building your Platform with Kubernetes == Keep it Simple by
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Wojciech Barczyński
448 views88 slides
Introduction to Kubernetes with demo by
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demoOpsta
2.5K views46 slides
Environment management in a continuous delivery world (3) by
Environment management in a continuous delivery world (3)Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Victor Iglesias
986 views37 slides
Continuous Delivery with Jenkins & Kubernetes @ Sky by
Continuous Delivery with Jenkins & Kubernetes @ SkyContinuous Delivery with Jenkins & Kubernetes @ Sky
Continuous Delivery with Jenkins & Kubernetes @ SkyAdriana Vasiu
516 views24 slides

More Related Content

What's hot

Back to the Future: Containerize Legacy Applications by
Back to the Future: Containerize Legacy ApplicationsBack to the Future: Containerize Legacy Applications
Back to the Future: Containerize Legacy ApplicationsDocker, Inc.
2.3K views38 slides
KUDO - Kubernetes Operators, the easy way by
KUDO - Kubernetes Operators, the easy wayKUDO - Kubernetes Operators, the easy way
KUDO - Kubernetes Operators, the easy wayNick Jones
127 views44 slides
Deploying WSO2 Middleware on Containers by
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersImesh Gunaratne
1.7K views85 slides
My kubernetes toolkit by
My kubernetes toolkitMy kubernetes toolkit
My kubernetes toolkitSreenivas Makam
208 views18 slides
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때 by
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때 [OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때 OpenStack Korea Community
188 views82 slides
SRE principles and (Kubernetes) Operator practice | DevNation Tech Talk by
SRE principles and (Kubernetes) Operator practice | DevNation Tech TalkSRE principles and (Kubernetes) Operator practice | DevNation Tech Talk
SRE principles and (Kubernetes) Operator practice | DevNation Tech TalkRed Hat Developers
3.4K views31 slides

What's hot(20)

Back to the Future: Containerize Legacy Applications by Docker, Inc.
Back to the Future: Containerize Legacy ApplicationsBack to the Future: Containerize Legacy Applications
Back to the Future: Containerize Legacy Applications
Docker, Inc.2.3K views
KUDO - Kubernetes Operators, the easy way by Nick Jones
KUDO - Kubernetes Operators, the easy wayKUDO - Kubernetes Operators, the easy way
KUDO - Kubernetes Operators, the easy way
Nick Jones127 views
Deploying WSO2 Middleware on Containers by Imesh Gunaratne
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on Containers
Imesh Gunaratne1.7K views
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때 by OpenStack Korea Community
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때 [OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때
[OpenInfra Days Korea 2018] Day 2 - E4 - 핸즈온 워크샵: 서버리스가 컨테이너를 만났을 때
SRE principles and (Kubernetes) Operator practice | DevNation Tech Talk by Red Hat Developers
SRE principles and (Kubernetes) Operator practice | DevNation Tech TalkSRE principles and (Kubernetes) Operator practice | DevNation Tech Talk
SRE principles and (Kubernetes) Operator practice | DevNation Tech Talk
Red Hat Developers3.4K views
Kubernetes and Cloud Native Meetup - March, 2019 by CloudOps2005
Kubernetes and Cloud Native Meetup - March, 2019Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019
CloudOps2005389 views
Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat... by Red Hat Developers
Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...
Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...
Red Hat Developers7.2K views
Cloud Native CI/CD with Jenkins X and Knative Pipelines by C4Media
Cloud Native CI/CD with Jenkins X and Knative PipelinesCloud Native CI/CD with Jenkins X and Knative Pipelines
Cloud Native CI/CD with Jenkins X and Knative Pipelines
C4Media1K views
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk by Red Hat Developers
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
Red Hat Developers8.6K views
5 Habits of High-Velocity Teams Using Kubernetes by Codefresh
5 Habits of High-Velocity Teams Using Kubernetes5 Habits of High-Velocity Teams Using Kubernetes
5 Habits of High-Velocity Teams Using Kubernetes
Codefresh460 views
Building Your Docker Swarm Tech Stack by Bret Fisher
Building Your Docker Swarm Tech StackBuilding Your Docker Swarm Tech Stack
Building Your Docker Swarm Tech Stack
Bret Fisher119 views
CI/CD Pipeline mit Gitlab CI und Kubernetes by inovex GmbH
CI/CD Pipeline mit Gitlab CI und KubernetesCI/CD Pipeline mit Gitlab CI und Kubernetes
CI/CD Pipeline mit Gitlab CI und Kubernetes
inovex GmbH742 views
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga by JavaDayUA
Next-gen DevOps engineering with Docker and Kubernetes by Antons KrangaNext-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
JavaDayUA1.8K views
CI/CD with Openshift and Jenkins by Ari LiVigni
CI/CD with Openshift and JenkinsCI/CD with Openshift and Jenkins
CI/CD with Openshift and Jenkins
Ari LiVigni8.9K views
Considerations for operating docker at scale by Docker, Inc.
Considerations for operating docker at scaleConsiderations for operating docker at scale
Considerations for operating docker at scale
Docker, Inc.294 views

Similar to Kubeadm Deep Dive (Kubecon Seattle 2018)

kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA... by
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...ssuser92b4be
10 views20 slides
Kubernetes and Cloud Native Update Q4 2018 by
Kubernetes and Cloud Native Update Q4 2018Kubernetes and Cloud Native Update Q4 2018
Kubernetes and Cloud Native Update Q4 2018CloudOps2005
512 views119 slides
Intro to Kubernetes & GitOps Workshop by
Intro to Kubernetes & GitOps WorkshopIntro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps WorkshopWeaveworks
142 views56 slides
Free GitOps Workshop + Intro to Kubernetes & GitOps by
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsWeaveworks
177 views60 slides
The path to a Serverless-native era with Kubernetes by Paolo Mainardi by
The path to a Serverless-native era with Kubernetes by Paolo MainardiThe path to a Serverless-native era with Kubernetes by Paolo Mainardi
The path to a Serverless-native era with Kubernetes by Paolo MainardiNETWAYS
105 views89 slides
Introduction to kubernetes by
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
12.7K views146 slides

Similar to Kubeadm Deep Dive (Kubecon Seattle 2018)(20)

kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA... by ssuser92b4be
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
ssuser92b4be10 views
Kubernetes and Cloud Native Update Q4 2018 by CloudOps2005
Kubernetes and Cloud Native Update Q4 2018Kubernetes and Cloud Native Update Q4 2018
Kubernetes and Cloud Native Update Q4 2018
CloudOps2005512 views
Intro to Kubernetes & GitOps Workshop by Weaveworks
Intro to Kubernetes & GitOps WorkshopIntro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps Workshop
Weaveworks142 views
Free GitOps Workshop + Intro to Kubernetes & GitOps by Weaveworks
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks177 views
The path to a Serverless-native era with Kubernetes by Paolo Mainardi by NETWAYS
The path to a Serverless-native era with Kubernetes by Paolo MainardiThe path to a Serverless-native era with Kubernetes by Paolo Mainardi
The path to a Serverless-native era with Kubernetes by Paolo Mainardi
NETWAYS105 views
Introduction to kubernetes by Rishabh Indoria
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria12.7K views
Gitlab ci e kubernetes, build test and deploy your projects like a pro by sparkfabrik
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
sparkfabrik3.2K views
Deploy 22 microservices from scratch in 30 mins with GitOps by Opsta
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOps
Opsta205 views
Extending Kubectl.pptx by LibbySchulze
Extending Kubectl.pptxExtending Kubectl.pptx
Extending Kubectl.pptx
LibbySchulze204 views
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis... by Oleg Shalygin
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
Oleg Shalygin2.1K views
The path to a serverless-native era with Kubernetes by sparkfabrik
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
sparkfabrik944 views
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an... by AWS User Group Kochi
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
ACDKOCHI19 - Turbocharge Developer productivity with platform build on K8S an...
Kubernetes #1 intro by Terry Cho
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho1.5K views
Project Gardener - EclipseCon Europe - 2018-10-23 by msohn
Project Gardener - EclipseCon Europe - 2018-10-23Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23
msohn147 views
[GS네오텍] Google Kubernetes Engine by GS Neotek
[GS네오텍]  Google Kubernetes Engine [GS네오텍]  Google Kubernetes Engine
[GS네오텍] Google Kubernetes Engine
GS Neotek308 views
SCM Puppet: from an intro to the scaling by Stanislav Osipov
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
Stanislav Osipov5.1K views
Deploying Kubernetes on GCP with Kubespray by Altoros
Deploying Kubernetes on GCP with KubesprayDeploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with Kubespray
Altoros38.2K views

More from Liz Frost

EZRust: Z80 for the Web by
EZRust: Z80 for the WebEZRust: Z80 for the Web
EZRust: Z80 for the WebLiz Frost
247 views57 slides
Kubernetes from a Box Mix by
Kubernetes from a Box MixKubernetes from a Box Mix
Kubernetes from a Box MixLiz Frost
304 views74 slides
You got database in my cloud! by
You got database  in my cloud!You got database  in my cloud!
You got database in my cloud!Liz Frost
207 views80 slides
Postgres plays pokemon by
Postgres plays pokemonPostgres plays pokemon
Postgres plays pokemonLiz Frost
430 views60 slides
CGo for fun and profit by
CGo for fun and profitCGo for fun and profit
CGo for fun and profitLiz Frost
439 views86 slides
You got database in my cloud (short version) by
You got database  in my cloud (short version)You got database  in my cloud (short version)
You got database in my cloud (short version)Liz Frost
287 views33 slides

More from Liz Frost(6)

EZRust: Z80 for the Web by Liz Frost
EZRust: Z80 for the WebEZRust: Z80 for the Web
EZRust: Z80 for the Web
Liz Frost247 views
Kubernetes from a Box Mix by Liz Frost
Kubernetes from a Box MixKubernetes from a Box Mix
Kubernetes from a Box Mix
Liz Frost304 views
You got database in my cloud! by Liz Frost
You got database  in my cloud!You got database  in my cloud!
You got database in my cloud!
Liz Frost207 views
Postgres plays pokemon by Liz Frost
Postgres plays pokemonPostgres plays pokemon
Postgres plays pokemon
Liz Frost430 views
CGo for fun and profit by Liz Frost
CGo for fun and profitCGo for fun and profit
CGo for fun and profit
Liz Frost439 views
You got database in my cloud (short version) by Liz Frost
You got database  in my cloud (short version)You got database  in my cloud (short version)
You got database in my cloud (short version)
Liz Frost287 views

Recently uploaded

Deutsch Crimping by
Deutsch CrimpingDeutsch Crimping
Deutsch CrimpingIwiss Tools Co.,Ltd
21 views7 slides
Digital Watermarking Of Audio Signals.pptx by
Digital Watermarking Of Audio Signals.pptxDigital Watermarking Of Audio Signals.pptx
Digital Watermarking Of Audio Signals.pptxAyushJaiswal781174
8 views25 slides
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,... by
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...AakashShakya12
57 views115 slides
An approach of ontology and knowledge base for railway maintenance by
An approach of ontology and knowledge base for railway maintenanceAn approach of ontology and knowledge base for railway maintenance
An approach of ontology and knowledge base for railway maintenanceIJECEIAES
12 views14 slides
Informed search algorithms.pptx by
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptxDr.Shweta
13 views19 slides
Saikat Chakraborty Java Oracle Certificate.pdf by
Saikat Chakraborty Java Oracle Certificate.pdfSaikat Chakraborty Java Oracle Certificate.pdf
Saikat Chakraborty Java Oracle Certificate.pdfSaikatChakraborty787148
14 views1 slide

Recently uploaded(20)

Literature review and Case study on Commercial Complex in Nepal, Durbar mall,... by AakashShakya12
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
AakashShakya1257 views
An approach of ontology and knowledge base for railway maintenance by IJECEIAES
An approach of ontology and knowledge base for railway maintenanceAn approach of ontology and knowledge base for railway maintenance
An approach of ontology and knowledge base for railway maintenance
IJECEIAES12 views
Informed search algorithms.pptx by Dr.Shweta
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptx
Dr.Shweta13 views
13_DVD_Latch-up_prevention.pdf by Usha Mehta
13_DVD_Latch-up_prevention.pdf13_DVD_Latch-up_prevention.pdf
13_DVD_Latch-up_prevention.pdf
Usha Mehta10 views
Performance of Back-to-Back Mechanically Stabilized Earth Walls Supporting th... by ahmedmesaiaoun
Performance of Back-to-Back Mechanically Stabilized Earth Walls Supporting th...Performance of Back-to-Back Mechanically Stabilized Earth Walls Supporting th...
Performance of Back-to-Back Mechanically Stabilized Earth Walls Supporting th...
ahmedmesaiaoun12 views
MSA Website Slideshow (16).pdf by msaucla
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdf
msaucla46 views
Multi-objective distributed generation integration in radial distribution sy... by IJECEIAES
Multi-objective distributed generation integration in radial  distribution sy...Multi-objective distributed generation integration in radial  distribution sy...
Multi-objective distributed generation integration in radial distribution sy...
IJECEIAES15 views
9_DVD_Dynamic_logic_circuits.pdf by Usha Mehta
9_DVD_Dynamic_logic_circuits.pdf9_DVD_Dynamic_logic_circuits.pdf
9_DVD_Dynamic_logic_circuits.pdf
Usha Mehta28 views

Kubeadm Deep Dive (Kubecon Seattle 2018)

  • 2. Agenda ● Who? ● Mission ● GA ● Roadmap 2019 ● Getting Involved ● Q/A L
  • 4. Who are we? Timothy St. Clair SIG Cluster Lifecycle co-lead Steering Committee Member Staff Engineer @Heptio/VMWare @timothysc Liz Frost SIG Cluster Lifecycle Contributor Kube Cuddle creator SW Engineer @Heptio/VMWare @liztio
  • 5. Who are we? ● 100s of contributors across several companies ● Smaller core group of active maintainers ○ VMWare ■ Lubomir, Ross ○ VMWare (née Heptio) ■ Tim, Liz, Jason, Chuck ○ Suse ■ Marek, Rafael ○ Intel ■ Alex, Ed ○ Other/Independent ■ Luxas, Fabrizio, Yago, Di ● Large user community on #kubeadm L
  • 7. What is our mission? SIG Cluster Lifecycle’s objective is to simplify creation, configuration, upgrade, downgrade, and teardown of Kubernetes clusters and their components. L
  • 9. Why are we doing this? ● To prevent the mistakes of other open source cluster mgmt provisioning tools ○ Because… ■ Kubernetes is the beginning of the story, not the end ■ commoditizing the deployment of the core raises all boats and allows the community to focus on solving end user problems ■ “production grade” shouldn’t be firewalled by providers ■ It should “just work” ■ Because cross provider matters ● To make the management of (X) clusters across (Y) providers simple, secure, and configurable. T
  • 10. Why (unix philosophy)? ● Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features". ● Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Don't insist on interactive input. ● Design and build software, to be tried early, ideally within weeks. Don't hesitate to throw away the clumsy parts and rebuild them. ● Use tools instead of people to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you've finished using them. ○ Write down the “Hard Way” and optimize 80% UX Flow with override T
  • 11. Key Design Takeaways ● kubeadm’s task is to set up a best-practice cluster for each minor version ● The user experience should be simple, and the cluster reasonably secure ● kubeadm’s scope is limited; intended to be a composable building block ○ Only ever deals with the local filesystem and the Kubernetes API ○ Agnostic to how exactly the kubelet is run ○ Setting up or favoring a specific CNI network is out of scope ● Composable architecture with everything divided into phases ● Versioned configuration T
  • 12. Component View Master 1 Master N Node 1 Node N kubeadm kubeadm kubeadm kubeadm Cloud Provider Load Balancers Monitoring Logging Cluster API Spec Cluster API Cluster API Implementation Addons Kubernetes API Bootstrapping Machines Infrastructure Layer 2 The scope of kubeadm Layer 3 Layer 1
  • 14. What does GA mean? ● Stable command-line UX — The kubeadm CLI conforms to #5a GA rule of the Kubernetes Deprecation Policy, which states that a command or flag that exists in a GA version must be kept for at least 12 months after deprecation. ○ init/join/upgrade/config/reset/token/version ● Stable underlying implementation — kubeadm now creates a new Kubernetes cluster using methods that shouldn’t change any time soon. The control plane, for example, is run as a set of static Pods, bootstrap tokens are used for the kubeadm join flow, and ComponentConfig is used for configuring the kubelet. ● Upgrades between minor versions — The kubeadm upgrade command is now fully GA. It handles control plane upgrades for you, which includes upgrades to etcd, the API Server, the Controller Manager, and the Scheduler. You can seamlessly upgrade your cluster between minor or patch versions (e.g. v1.12.2 -> v1.13.1 or v1.13.1 -> v1.13.3). T
  • 15. What does GA mean? ● Configuration file schema — With the new v1beta1 API version, you can now tune almost every part of the cluster declaratively and thus build a “GitOps” flow around kubeadm-built clusters. In future versions, we plan to graduate the API to version v1 with minimal changes (and perhaps none). ○ Examples and references are now in standard Godoc format ○ Config is split into parts ■ InitConfiguration ■ ClusterConfiguration - stored on cluster in a configmap ■ JoinConfiguration L
  • 16. kubeadm: InitConfiguration apiVersion: kubeadm.k8s.io/v1beta1 kind: InitConfiguration localAPIEndpoint: advertiseAddress: "10.100.0.1" bindPort: 6443 nodeRegistration: criSocket: "/var/run/crio/crio.sock" kubeletExtraArgs: cgroupDriver: "cgroupfs" bootstrapTokens: ... • Usage • “kubeadm init --config …” • Why • Custom API endpoint address • Specify init bootstrap tokens • Pass custom kubelet flags • Set node name/taints L
  • 17. kubeadm: Cluster Configuration apiVersion: kubeadm.k8s.io/v1beta1 kind: ClusterConfiguration kubernetesVersion: "v1.12.2" imageRepository: registry.example.com networking: serviceSubnet: "10.96.0.0/12" dnsDomain: "cluster.local" etcd: ... apiServer: extraArgs: ... extraVolumes: ... • Usage • “kubeadm init --config …” • Why • Fine tune cluster defaults • Custom arguments and volume mounts to control plane components L
  • 18. What does GA mean? ● The “toolbox” interface of kubeadm — Also known as phases. If you don’t want to perform all kubeadm init tasks, you can instead apply more fine-grained actions using the kubeadm init phase command (for example generating certificates or control plane Static Pod manifests). ○ Currently this only applies to `kubeadm init` ○ In 2019 - `kubeadm join phases` ● etcd setup — etcd is now set up in a way that is secure by default, with TLS communication everywhere, and allows for expanding to a highly available cluster when needed. T
  • 19. kubeadm: init phases preflight Run pre-flight checks kubelet-start Writes kubelet settings and (re)starts the kubelet certs Generates certificates for a Kubernetes cluster kubeconfig Generates all kubeconfig files for the control plane and the admin kubeconfig file control-plane Generates all static Pod manifest files necessary to establish the control plane etcd Generates static Pod manifest file for local etcd. upload-config Uploads the currently used configuration for kubeadm to a ConfigMap mark-control-plane Mark a node as a control-plane bootstrap-token Manage kubeadm-specific bootstrap token functions addon Installs required addons for passing Conformance tests T
  • 20. kubeadm: init phases Run Preflight Checks Install DNS and Proxy Addons Setup the RBAC Authorization System Taint and label the master Upload kubeadm & kubelet config to a ConfigMap Kubelet Start Wait for the control plane to be healthy Generate static Pod Manifests for the Control Plane Generate Certificates Generate KubeConfig Files Generate a (by default random) Bootstrap Token T
  • 21. kubeadm joinkubeadm join Preflight Checks Fetches Init Configuration Run Specific Checks base on the Init Configuration Checks if the Cluster Configuration Supports Runs Kubeadm Init Preflight Check Generates static Pod Manifests for new Control Plane Bootstraps Kubelet Uploading Currently Used InitConfiguration Applies Master Label and Taints --experimental-control-plane --experimental-control-plane
  • 22. kubeadm upgrade: Control Plane Preflight Checks Checks if the cluster is healthy Gets the configuration from the "kubeadm-config" ConfigMap Enforces all version skew policies Upgrades the control plane Static Pods Upgrade RBAC rules and addons L
  • 24. Certificate Management ● apiserver ● apiserver-kubelet-client ● front-proxy-client ● etcd-server ● etcd-peer ● etcd-healthcheck-client ● apiserver-etcd-client ● user certificates L
  • 25. Certificate Hierarchy ● root CA ○ apiserver ○ apiserver-kubelet-client ● front-proxy CA ○ front-proxy-client ● etcd CA ○ etcd-server ○ etcd-peer ○ etcd-healthcheck-client ○ apiserver-etcd-client L
  • 26. Certificate Hierarchy ● root CA ○ apiserver ○ apiserver-kubelet-client ● front-proxy CA ○ front-proxy-client ● etcd CA ○ etcd-server ○ etcd-peer ○ etcd-healthcheck-client ○ apiserver-etcd-client root CA etcd CA front proxy CA kube client api server etcd server etcd peer etcd health check api etcd client front proxy client L
  • 27. Certificate Generation ● From Scratch root CA etcd CA front proxy CA kube client api server etcd server etcd peer etcd health check api etcd client front proxy client L
  • 28. Certificate Generation ● From Scratch ● Provided CAs (+ keys) root CA etcd CA front proxy CA kube client api server etcd server etcd peer etcd health check api etcd client front proxy client L
  • 29. Certificate Generation ● From Scratch ● Provided CAs (+ keys) ● All External (keys optional) root CA etcd CA front proxy CA kube client api server etcd server etcd peer etcd health check api etcd client front proxy client L
  • 30. Certificate Generation ● From Scratch ● Provided CAs (+ keys) ● All External (keys optional) ● Mixed root CA etcd CA front proxy CA kube client api server etcd server etcd peer etcd health check api etcd client front proxy client L
  • 31. Other Certificate Options ● Generate CSRs! ● `kubeadm alpha certs renew` ● Certificates API requests L
  • 33. 2019 Roadmap ● Config to v1 ● HA to GA ○ Full test automation ● Continued promotion of alpha phases to subcommands ○ e.g. join phases ● Grand unified field theory on ComponentConfiguration ○ Working group being formed. ● Incorporate etcdadm and bundles when stable ● Test and release automation … T
  • 34. Testing and release tooling T
  • 35. 2019 Roadmap - CI + Release ● CI ○ KIND as the only PR blocking job ○ Move all SCL jobs to periodics ○ CI = release artifacts ○ Kill `kubernetes-anywhere` with extreme prejudice ● Release ○ Move all package building into k/k ■ .deb/rpm build artifacts ○ Keep signing and publishing separate in the release repo ○ Work with k8s-infra team ■ Want -devel and -stable repos & registries T
  • 37. How can you contribute ● Contributing to SIG Cluster Lifecycle documentation ● We’re working on growing the contributor/reviewers pool; scaling the SIG ● We have “Office Hours” for our projects: weekly for kubeadm, bi-weekly for kops and kubespray… ● Cluster API office hours weekly for both US West Coast and EMEA ● Full list of SIG meetings and links to minutes and recordings can be found on SIG page ● Attend our Zoom meetings / be around on Slack ● Look for “good first issue”, “help wanted” and “sig/cluster-lifecycle” labeled issues in our repositories L
  • 38. Logistics ● Follow the SIG Cluster Lifecycle YouTube playlist ● Check out the meeting notes for our weekly office hours meetings ● Join #sig-cluster-lifecycle, #kubeadm channels ● Check out the kubeadm setup guide, reference doc and design doc ● Read how you can get involved and improve kubeadm! L