From 4aedbb69c2874c213505591c67b8b0362baf3d29 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sun, 22 Apr 2018 12:14:16 -0500 Subject: [PATCH 1/5] Re-ordering --- slides/kube/dashboard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slides/kube/dashboard.md b/slides/kube/dashboard.md index bdfa2b18..0606b975 100644 --- a/slides/kube/dashboard.md +++ b/slides/kube/dashboard.md @@ -256,9 +256,9 @@ The dashboard will then ask you which authentication you want to use. - It's safe if you use HTTPS URLs from trusted sources +- Example: the official setup instructions for most pod networks + -- - It introduces new failure modes -- Example: the official setup instructions for most pod networks - From 3de1fab66ab763549c507aaed278136690aa01f5 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sun, 22 Apr 2018 14:04:57 -0500 Subject: [PATCH 2/5] Clarifying failure mode --- slides/kube/dashboard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides/kube/dashboard.md b/slides/kube/dashboard.md index 0606b975..65e1ed33 100644 --- a/slides/kube/dashboard.md +++ b/slides/kube/dashboard.md @@ -260,5 +260,5 @@ The dashboard will then ask you which authentication you want to use. -- -- It introduces new failure modes +- It introduces new failure modes (like if you try to apply yaml from a link that's no longer valid) From f8131c97e9cbbbdde8d5d87923f30b23f341dda4 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sun, 22 Apr 2018 14:35:50 -0500 Subject: [PATCH 3/5] Adding goto's kube101 --- slides/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slides/index.html b/slides/index.html index bce01660..39447610 100644 --- a/slides/index.html +++ b/slides/index.html @@ -73,8 +73,9 @@ thing for now (stay tuned...) April 24th, 2018: GOTO Chicago - Kubernetes 101 -   + +   From 5158ac3d981b30611d8a89f51dc5e49f640e9c50 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Sun, 22 Apr 2018 15:49:32 -0500 Subject: [PATCH 4/5] Clarify rollout params --- slides/kube/rollout.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/slides/kube/rollout.md b/slides/kube/rollout.md index aa8eb0f9..8aa7df09 100644 --- a/slides/kube/rollout.md +++ b/slides/kube/rollout.md @@ -33,6 +33,23 @@ --- +## Checking current rollout parameters + +- Recall how we build custom reports with `kubectl` and `jq`: + +.exercise[ + +- Show the rollout plan for our deployments: + ```bash + kubectl get deploy -o json | + jq ".items[] | {name:.metadata.name} + .spec.strategy.rollingUpdate" + ``` + +] + +--- + + ## Rolling updates in practice - As of Kubernetes 1.8, we can do rolling updates with: @@ -141,6 +158,24 @@ Our rollout is stuck. However, the app is not dead (just 10% slower). --- +## Why 10% slower? + +- We start with 10 pods running for the `worker` deployment + +- Current settings: MaxUnavailable=1 and MaxSurge=1 + +- When we start the rollout: + + - one replica is taken down (as per MaxUnavailable=1) + - another is created (with the new version) to replace it + - another is created (with the new version) per MaxSurge=1 + +- Now we have 9 replicas up and running, and 2 being deployed + +- Our rollout is stuck at this point! + +--- + ## Recovering from a bad rollout - We could push some `v0.3` image @@ -222,6 +257,8 @@ spec: minReadySeconds: 10 " kubectl rollout status deployment worker + kubectl get deploy -o json worker | + jq "{name:.metadata.name} + .spec.strategy.rollingUpdate" ``` ] From 0305c3783f21806bb5d23c6b3bda4c56bf3f0443 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Mon, 23 Apr 2018 10:52:29 -0500 Subject: [PATCH 5/5] Adding an overview; marking clarification as extra --- slides/kube/rollout.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/slides/kube/rollout.md b/slides/kube/rollout.md index 8aa7df09..a6120b9f 100644 --- a/slides/kube/rollout.md +++ b/slides/kube/rollout.md @@ -158,7 +158,21 @@ Our rollout is stuck. However, the app is not dead (just 10% slower). --- -## Why 10% slower? +## What's going on with our rollout? + +- Why is our app 10% slower? + +- Because `MaxUnavailable=1`, so the rollout terminated 1 replica out of 10 available + +- Okay, but why do we see 2 new replicas being rolled out? + +- Because `MaxSurge=1`, so in addition to replacing the terminated one, the rollout is also starting one more + +--- + +class: extra-details + +## The nitty-gritty details - We start with 10 pods running for the `worker` deployment