---
# System prepended metadata

title: Kubernetes in Practice - Day 1+2 07-08/04/2020

---

# Kubernetes in Practice - Day 1+2 07-08/04/2020

## Trainers

* [Jonathan Grahl](mailto:jonathan.grahl@jetstack.io)
* [Jon Tutcher](mailto:jon.tutcher@jetstack.io)
* Day 2: [Matt Bates](mailto:matt.bates@jetstack.io)

## House Rules & Tips

To make the most out of this training course, and to help others, try and make sure you have:
- A decent internet connection
- A quiet room --- although you should still mute your microphone when not speaking in the Zoom call
- A high quality microphone or headset
- Your camera turned on (preferably) in the Zoom call

Additionally, if you have more than one monitor, turning 'dual screen support' on in Zoom (and then restarting the call) gives you a more pleasant experience.

During presentations:
- Ask questions here in HackMD (or in the Zoom chat if you prefer)
- Remaining questions will be answered at the end of a subject (e.g. just before a workshop starts)

During workshops:
- Ask questions verbally, or in HackMD or Zoom chat if you prefer

## Setup

|                 Zoom                 |  Meeting ID | Password |
|--------------------------------------|-------------|----------|
| [download](https://zoom.us/download) | 889 051 442 |   076864 |

### Links

- [Short URL to this page: **bit.ly/2V7sKJJ**](https://bit.ly/2V7sKJJ)
- [FlightDeck for Workshops](https://flightdeck.jetstack.io/invitation/eyJhbGciOiJBMTI4R0NNS1ciLCJlbmMiOiJBMTI4R0NNIiwiaXYiOiJ5MTdSaWFnTWNvTDY5RHhJIiwidGFnIjoidXZNa3UxNGNLeFg0QU5UOUxCZ1dUdyJ9.VvqgX44cTNqDB-oc4IcIPw.4YIUKXjA4Dq0-8EH.LBxidLucrPl3baK5UBldB5h7g-ad7Nucj5Ipu8nomhGFGUyGAlKxwtyFqxmS2HCzlvcvA_0AOTE.EwxH23Nwg6p6e0LLILztIQ)
- [Google Cloud Shell](https://ssh.cloud.google.com/cloudshell/) - if you're redirected to the cloud editor, that can be toggled off by pressing the pencil icon in the top right
- [kubectl autocomplete](https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete)


## Schedule (Both Days) 

|                 |    (CEST)   |    (BST)    |
|-----------------|-------------|-------------|
| Start           | 9:30        | 08.30       |
| Coffee break    | 10:45-11:00 | 10:00-10:10 |
| Lunch           | 12:00-13:00 | 11:00-12:00 |
| Afternoon break | 15:00-15:10 | 14:00-14:10 |
| Finish          | 17:00       | 16:00       |


## Day 2 ([Slides](https://storage.googleapis.com/jetstack-attendee-resources/2020-04-06-kubernetes-in-practice-day-2.pdf?x-goog-signature=8e09cf98cbd9423ad5ce65191e515a583be23be125b1e5091fc8aaf6e12eb692182c12153cfc60699177b1595368cc4398417c6469429c9b868feaa600df4789415b20747112fb16eb4b2ee34b7ebddbf6378605284f0bd14bc9242b2da64f79100924f26ae267ca1be11fe888b5605fb20348d82d9c4c409ebcedbc6e3f774548d4190a29541b9e6099eaa3933eb8f71bb59b9111b32a27befdc60606079314cf153cb139c15a4ddbadcd1cae9e6c72486ff530d5abf492a69973549cbc979204503f80231cb973a249b8e81fb0e4a9aac0401c6ebe0bf30e05160eaf616d1c1d2a6e0c4352652af096e6779d016c5ae19d15388c5e59511704208b773cda4e&x-goog-algorithm=GOOG4-RSA-SHA256&x-goog-credential=jetstack-attendee-resources-si%40jetstack-workshops.iam.gserviceaccount.com%2F20200406%2Feu%2Fstorage%2Fgoog4_request&x-goog-date=20200406T172111Z&x-goog-expires=259200&x-goog-signedheaders=host))

### Hot Fixes

#### Workshop 2

Workshop 2 asks you to install Helm and Tiller. As Christoffer mentioned - these instructions are out of date. Skip this step for now

#### Workshop 6

We can now use Helm v3 rather than Helm v2 to deploy MongoDB. This no longer requires the 'tiller' setup step that we skipper this morning.

1. Install Helm locally on your machine, using instructions here: https://helm.sh/docs/intro/install/
2. Use this command rather than the command shown in Flightdeck to install MongoDB: `$ helm install $RELEASE_NAME --version 3.9.6 -f values.yaml stable/mongodb-replicaset --namespace sock-shop`

#### Workshop 7

If you're using Helm3 locally, you'll need to adjust the syntax of the commands to suit. `helm install --name myrelease somechartname` becomes `helm install myrelease somechartname`

---

## Useful Tools

* https://github.com/ahmetb/kubectx <- lets you switch clusters and namespaces on the command line easily
* https://github.com/vmware-tanzu/octant/releases <- Dashboard replacement
* [Kustomize](https://kustomize.io/): Kubernetes integrated "config management" of resources
* [Helm](https://helm.sh/docs/intro/quickstart/)


---
---
---



## Day 1 ([Slides](https://storage.googleapis.com/jetstack-attendee-resources/2020-04-06-kubernetes-in-practice-day-1.pdf?x-goog-signature=9814c62fab7e7aa7d29bab4bfa5d35ba6729441f95ee20d71cfb47c85c97080f3d24581cd0e7e03d37d15d05fc8480b962333d0f97c920b547d102da492ca25811dffc732f798a32327fc09d57e3578dffd6c56027fdeccf7ebe67459e736ac365d2ac7c3de0dbe0b9e327335f269c4bd57ba4e8b6fdd133f1ced670f2e1c2089f3e232dc21a0f1c6ac638d6dfa0d0ad58a7bd5f294ec2bcf732771dc2e34aac9909ee7e09c33685126f6dc868693fcfe405e47ba16becf4d21ca27f6ae988cbfa60368aac438d9c5cc1912ac709d528ed2f9af0e99d867d83b4017ac2e7d2d83e47df4a8194ea6ca044075549d095ba943dca67bc717b4c26e547994aa2ecd1&x-goog-algorithm=GOOG4-RSA-SHA256&x-goog-credential=jetstack-attendee-resources-si%40jetstack-workshops.iam.gserviceaccount.com%2F20200406%2Feu%2Fstorage%2Fgoog4_request&x-goog-date=20200406T171959Z&x-goog-expires=259200&x-goog-signedheaders=host))


### Hot Fixes

#### Workshop 2: Muster a Cluster -- Step 2

```
ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=No valid versions with the prefix "1.13" found.
```

**Please use 1.14 instead**

```shell
$ gcloud container clusters create \
  --cluster-version=1.14 \
  --scopes https://www.googleapis.com/auth/devstorage.full_control \
  --num-nodes 4 \
  <your-cluster-name>
```

#### Workshop 2: 'Pods Unschedulable Errors'

With recent releases of GKE, your `sock-shop` deployment may not fit onto the three node cluster specified in the instructions. If you find that some resources cannot be scheduled in your cluster, you can increase its size:

```
gcloud container clusters resize $YOUR_CLUSTER_NAME --num-nodes 4
```

---

## Questions

If you have any questions during presentations, you can type them here by clicking the 'edit' (Ctrl+alt+e, top left of HackMD) button, scrolling to this text, and typing.