SlideShare a Scribd company logo
How to Handle your
Upgrades
Thursday, March 7, 2019
$ whoami - Suvro
$ kubectl describe suvro
Suvrojeet Kumar Ghosh
ghosh.suvrojeet@gmail.com
by day at Ribbon Communications
and by evening
GitHub: @fOO223Fr
Twitter: @_suvzz
$ ls -ltr
• Architecture and General methodology
• Problems/Errors faced
• Update Flowchart
• Resources used for help
• Heads-up for things to look for when upgrading!
• [ bonus slide ;) ] Automation ideas
• Questions?
@_suvzz
Architecture
Master Master
Worker Worker Worker
VIP
passiveactive
GlusterFS for etcd
BackU
p
@_suvzz
General methodology
• Hop by Hop
• example: v1.9.2 to v1.12.5
v1.9.
2
v1.10.
12
v1.11.
0
Reason for such a kind of methodology are two:
1. Usually the patch 0 of every version has major changes from the
last lower version.
2. The last path version (incase of v1.10 is 12) is kind of the
accumulation of the intermediate patches. So before moving next
major version running though this has proved beneficial for many.
Note: this is a strategy and not everyone need to follow it because it
depends what features your cluster is using and what has changed.
But by far most are benefitted following this strategy.
@_suvzz
Update Flowchart
Update
kubeadm binary
kubeadm config images list
kubeadm config images pull
kubeadm upgrade apply
v1.XX.x
kubeadm config migrate
Update your CNI
Update all binaries kubectl , kubeadm,
kubelet
Optional for newer
version > v1.9
Version older than v1.9 download a temp
kubeadm binary, else it might mess with
the drop in file. 10-kubeadm.conf
Version > v1.11.0, take advantage of
these cool subcommands
helps if you have a private docker repo
then you can download ahead of upgrade
and tag it appropriately.
I have used this ever since v1.11.0 saves a lot of
time in replacing deprecated flags or
configuration changes.
kubeadm upgrade plan
Check and/or Update
nodeName to current
Master
kubectl edit configmap -n kube-
system kubeadm-config -o yaml
@_suvzz
Flowchart continued..
(optional) Update kubectl in
worker nodes
kubectl drain $NODEs --ignore-
daemonsets
Update kubelet version in
worker nodes
kubeadm upgrade node config --kubelet-
version v1.X.x
Update the kubeadm config map
Restart kubelet
Kubectl uncordon $node
@_suvzz
Problems
• Backing off of containers!
• Etcd: possible errors pid locked by last etcd and/or deprecated API endpoints.
• Apiserver: usually when etcd unhealthy and/or deprecated flags.
• Mirror pod hash race condition between etcd and apiserver which make
upgrade to fail in the older versions. PR:61942
I have faced this problem in v1.9 and was fixed with retrying couple of times.
• (Version < v1.11 )if kubelet fails to understand the node ip or if you are using
private IP, use –-node-ip flag to explicitly mention the IP.
• Explicitly mention --cgroup-driver to kubelet (in my case: cgroupfs but was
detected as systemd)
@_suvzz
Resources
• Godoc: https://godoc.org/k8s.io/kubernetes (I use this often to check on struct and value types)
• CHANGELOGs: https://github.com/kubernetes/kubernetes/CHANGELOG-
1.X.X.md (Holy grail for updates)
• Upgrade docs in kubernetes.io: https://kubernetes.io/docs/tasks/administer-
cluster/kubeadm/
@_suvzz
Heads-up for things to look for when
upgrading
• Change the version on top right of kubernetes.io and then manually find the
document you need because if you search it will always point you to the latest
version. Docs older than v1.9 are not available
• Always check the Release notes/Changelog before performing any upgrade
operation. Watch out for “[action required]” and/or “Before Upgrading”
• Features gate changed from string “” to map {“”} PR:57962 in kubeadm-config.
Applicable upgrading from v1.9 to v1.10
• (version v1.10 to v1.11) there has been change in kubeadm config file format
MasterConfiguration (v1alpha2) is broken down (in v1alpha3)to InitConfiguration
and ClusterConfiguration. Source
• (version v1.10 to v1.11) Major changes in the drop-in file
/etc/systemd/system/kubelet.service.d/10-kubeadm.conf. Keep an eye here and put in your
EXTRA KUBELET ARGS accordingly to the file it belongs. Source
• (version v1.11 to v1.12) control plane images don’t require architecture type
anymore. Source
@_suvzz
Automation ideas
• Ansible roles
• Warmup role
• Changes with every major version of k8s. All the release notes stuff goes in here.
• Update role
• Common module for all updates. This role runs after the warmup role
• Bash helper scripts
• script to drain nodes
• Script to cordon and uncordon nodes
@_suvzz
$ poweroff
• The upgrade process is complicated but it worth taking the journey
and moving to the latest stable version to enjoy all the cool Graduated
stuffs!
• Upgrade has taught me a lot about kubernetes.
@_suvzz
Source

More Related Content

PPT
SVN Tool Information : Best Practices
PDF
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
PDF
GIT-Lesson-1
KEY
SVN Best Practices
ODP
Svn Basic Tutorial
PPTX
SVN Best Practices
PPT
Subversion workshop
PDF
CIbox - OpenSource solution for making your #devops better
SVN Tool Information : Best Practices
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
GIT-Lesson-1
SVN Best Practices
Svn Basic Tutorial
SVN Best Practices
Subversion workshop
CIbox - OpenSource solution for making your #devops better

What's hot (20)

PPT
Subversion Overview
PDF
Drupal 8 DevOps . Profile and SQL flows.
ODP
Nguyễn Vũ Hưng: Subversion best practices
PDF
Introduction to Subversion
PPTX
SVN Basics
PPT
Pentagon
PDF
Version Control With Subversion
PPT
Part 4 - Managing your svn repository using jas forge
PPTX
Angular boilerplate generator
ODP
Subversion User Guide
PDF
Subversion Best Practices
PPTX
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
PDF
Kubernetes Webinar Series - Exploring Daemon Sets and Jobs
PPTX
Getting Started With Subversion
PPTX
Running Cloudbreak on Kubernetes
PDF
Concourse - CI for the cloud
PDF
Building On Puppet and Puppet Forge
PPTX
Drupal 8 configuration development flow
PDF
Gitlab ci e kubernetes, build test and deploy your projects like a pro
PDF
Svn tutorial
Subversion Overview
Drupal 8 DevOps . Profile and SQL flows.
Nguyễn Vũ Hưng: Subversion best practices
Introduction to Subversion
SVN Basics
Pentagon
Version Control With Subversion
Part 4 - Managing your svn repository using jas forge
Angular boilerplate generator
Subversion User Guide
Subversion Best Practices
Parallel Running Automation Solution with Docker, Jenkins and Zalenium
Kubernetes Webinar Series - Exploring Daemon Sets and Jobs
Getting Started With Subversion
Running Cloudbreak on Kubernetes
Concourse - CI for the cloud
Building On Puppet and Puppet Forge
Drupal 8 configuration development flow
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Svn tutorial
Ad

Similar to How to Handle your Kubernetes Upgrades (20)

PPTX
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
PDF
Kubeadm Deep Dive (Kubecon Seattle 2018)
PDF
kubernetes practice
PPTX
Yet Another K8s Installer
PPTX
Upgrade Kubernetes the boring way
PPTX
A Million ways of Deploying a Kubernetes Cluster
PPTX
The Experience of Java on Kubernetes with Microservices from HackFest
PDF
Azure Kubernetes Service - benefits and challenges
PDF
Why I love Kubernetes Failure Stories and you should too - GOTO Berlin
PPTX
The Reality of DIY Kubernetes vs. PKS
PDF
Kubernetes at Buffer - 2 Years In
PDF
Kubernetes day 2 @ zse energia
PPTX
5 Painless Demos to Get You Started with Kubernetes
PDF
Bdc from bare metal to k8s
PDF
Kubernetes at Datadog the very hard way
PDF
$ kubectl hacking @DevOpsCon Berlin 2019
PDF
[k8s] Kubernetes terminology (1).pdf
PDF
Kubernetes at Telekom Austria Group
PDF
KubeCon 2017 Zero Touch Provision
PDF
Kubecon 2017 Zero Touch Kubernetes
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
Kubeadm Deep Dive (Kubecon Seattle 2018)
kubernetes practice
Yet Another K8s Installer
Upgrade Kubernetes the boring way
A Million ways of Deploying a Kubernetes Cluster
The Experience of Java on Kubernetes with Microservices from HackFest
Azure Kubernetes Service - benefits and challenges
Why I love Kubernetes Failure Stories and you should too - GOTO Berlin
The Reality of DIY Kubernetes vs. PKS
Kubernetes at Buffer - 2 Years In
Kubernetes day 2 @ zse energia
5 Painless Demos to Get You Started with Kubernetes
Bdc from bare metal to k8s
Kubernetes at Datadog the very hard way
$ kubectl hacking @DevOpsCon Berlin 2019
[k8s] Kubernetes terminology (1).pdf
Kubernetes at Telekom Austria Group
KubeCon 2017 Zero Touch Provision
Kubecon 2017 Zero Touch Kubernetes
Ad

More from CloudOps2005 (20)

PDF
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
PPTX
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
PDF
The Salmon Algorithm Spawning with Kubernetes
PDF
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
PDF
Plateformes et infrastructure infonuagique natif de ville de Montréall
PPTX
Using Rook to Manage Kubernetes Storage with Ceph
PDF
Kafka on Kubernetes
PDF
Kubernetes: Crossing the Chasm
PPTX
Distributed Logging with Kubernetes
PDF
Kubernetes Security with Calico and Open Policy Agent
PDF
Advanced Deployment Strategies with Kubernetes and Istio
PDF
GitOps with ArgoCD
PPTX
Kubernetes Services are sooo Yesterday!
PPTX
Amazon EKS: the good, the bad, and the ugly
PDF
Kubernetes, Terraform, Vault, and Consul
PDF
SIG Multicluster and the Path to Federation
PDF
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
PDF
Operator SDK for K8s using Go
PDF
Kubernetes and Cloud Native Meetup - March, 2019
PDF
Prometheus and Thanos
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
The Salmon Algorithm Spawning with Kubernetes
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Plateformes et infrastructure infonuagique natif de ville de Montréall
Using Rook to Manage Kubernetes Storage with Ceph
Kafka on Kubernetes
Kubernetes: Crossing the Chasm
Distributed Logging with Kubernetes
Kubernetes Security with Calico and Open Policy Agent
Advanced Deployment Strategies with Kubernetes and Istio
GitOps with ArgoCD
Kubernetes Services are sooo Yesterday!
Amazon EKS: the good, the bad, and the ugly
Kubernetes, Terraform, Vault, and Consul
SIG Multicluster and the Path to Federation
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
Operator SDK for K8s using Go
Kubernetes and Cloud Native Meetup - March, 2019
Prometheus and Thanos

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation theory and applications.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation_ Review paper, used for researhc scholars
Empathic Computing: Creating Shared Understanding
Programs and apps: productivity, graphics, security and other tools
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Tartificialntelligence_presentation.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation theory and applications.pdf

How to Handle your Kubernetes Upgrades

  • 1. How to Handle your Upgrades Thursday, March 7, 2019
  • 2. $ whoami - Suvro $ kubectl describe suvro Suvrojeet Kumar Ghosh [email protected] by day at Ribbon Communications and by evening GitHub: @fOO223Fr Twitter: @_suvzz
  • 3. $ ls -ltr • Architecture and General methodology • Problems/Errors faced • Update Flowchart • Resources used for help • Heads-up for things to look for when upgrading! • [ bonus slide ;) ] Automation ideas • Questions? @_suvzz
  • 4. Architecture Master Master Worker Worker Worker VIP passiveactive GlusterFS for etcd BackU p @_suvzz
  • 5. General methodology • Hop by Hop • example: v1.9.2 to v1.12.5 v1.9. 2 v1.10. 12 v1.11. 0 Reason for such a kind of methodology are two: 1. Usually the patch 0 of every version has major changes from the last lower version. 2. The last path version (incase of v1.10 is 12) is kind of the accumulation of the intermediate patches. So before moving next major version running though this has proved beneficial for many. Note: this is a strategy and not everyone need to follow it because it depends what features your cluster is using and what has changed. But by far most are benefitted following this strategy. @_suvzz
  • 6. Update Flowchart Update kubeadm binary kubeadm config images list kubeadm config images pull kubeadm upgrade apply v1.XX.x kubeadm config migrate Update your CNI Update all binaries kubectl , kubeadm, kubelet Optional for newer version > v1.9 Version older than v1.9 download a temp kubeadm binary, else it might mess with the drop in file. 10-kubeadm.conf Version > v1.11.0, take advantage of these cool subcommands helps if you have a private docker repo then you can download ahead of upgrade and tag it appropriately. I have used this ever since v1.11.0 saves a lot of time in replacing deprecated flags or configuration changes. kubeadm upgrade plan Check and/or Update nodeName to current Master kubectl edit configmap -n kube- system kubeadm-config -o yaml @_suvzz
  • 7. Flowchart continued.. (optional) Update kubectl in worker nodes kubectl drain $NODEs --ignore- daemonsets Update kubelet version in worker nodes kubeadm upgrade node config --kubelet- version v1.X.x Update the kubeadm config map Restart kubelet Kubectl uncordon $node @_suvzz
  • 8. Problems • Backing off of containers! • Etcd: possible errors pid locked by last etcd and/or deprecated API endpoints. • Apiserver: usually when etcd unhealthy and/or deprecated flags. • Mirror pod hash race condition between etcd and apiserver which make upgrade to fail in the older versions. PR:61942 I have faced this problem in v1.9 and was fixed with retrying couple of times. • (Version < v1.11 )if kubelet fails to understand the node ip or if you are using private IP, use –-node-ip flag to explicitly mention the IP. • Explicitly mention --cgroup-driver to kubelet (in my case: cgroupfs but was detected as systemd) @_suvzz
  • 9. Resources • Godoc: https://godoc.org/k8s.io/kubernetes (I use this often to check on struct and value types) • CHANGELOGs: https://github.com/kubernetes/kubernetes/CHANGELOG- 1.X.X.md (Holy grail for updates) • Upgrade docs in kubernetes.io: https://kubernetes.io/docs/tasks/administer- cluster/kubeadm/ @_suvzz
  • 10. Heads-up for things to look for when upgrading • Change the version on top right of kubernetes.io and then manually find the document you need because if you search it will always point you to the latest version. Docs older than v1.9 are not available • Always check the Release notes/Changelog before performing any upgrade operation. Watch out for “[action required]” and/or “Before Upgrading” • Features gate changed from string “” to map {“”} PR:57962 in kubeadm-config. Applicable upgrading from v1.9 to v1.10 • (version v1.10 to v1.11) there has been change in kubeadm config file format MasterConfiguration (v1alpha2) is broken down (in v1alpha3)to InitConfiguration and ClusterConfiguration. Source • (version v1.10 to v1.11) Major changes in the drop-in file /etc/systemd/system/kubelet.service.d/10-kubeadm.conf. Keep an eye here and put in your EXTRA KUBELET ARGS accordingly to the file it belongs. Source • (version v1.11 to v1.12) control plane images don’t require architecture type anymore. Source @_suvzz
  • 11. Automation ideas • Ansible roles • Warmup role • Changes with every major version of k8s. All the release notes stuff goes in here. • Update role • Common module for all updates. This role runs after the warmup role • Bash helper scripts • script to drain nodes • Script to cordon and uncordon nodes @_suvzz
  • 12. $ poweroff • The upgrade process is complicated but it worth taking the journey and moving to the latest stable version to enjoy all the cool Graduated stuffs! • Upgrade has taught me a lot about kubernetes. @_suvzz Source