Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #32

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assignments/assignment-2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Assignment 2:
-------------
Assignment 2: Docker in Kubernetes
----------------------------------

* Build the image:

Expand Down
4 changes: 2 additions & 2 deletions assignments/assignment-3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Assignment 3:
-------------
Assignment 3: Redeploy with fixes
---------------------------------

* Remove the old service and deployment:

Expand Down
15 changes: 13 additions & 2 deletions assignments/assignment-4.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Assignment, do the rolling update:
Assignment 4: Rolling Update
----------------------------

You probably haven't covered this in class. It gives you a chance to understand the
rolling update process. So long as you are quick enough with your monitoring, you
should see new pods spinning up. Once the new pods are responding to health checks,
Kubernetes switches the service to the new pods and kills the old ones. This allows
a relatively smooth switchover between versions.

For extra marks, try observing the HTTP responses from the deployed application to
determine the point at which the switchover occurs.

The following steps are required to do the rolling update:
* Build: `./step4/build.sh`
* Apply the manifest: `kubectl apply -f step4/k8s_manifests`
* use `kubectl get pods` to see pods shutdown and start in a rolling way

37 changes: 26 additions & 11 deletions guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
PyconUk - Kubernetes Workshop
=============================
Pycon IE - Kubernetes Workshop
==============================

This repository is a fork of Ali Zaidi's and Paul van der Linden's PyCon UK repository.
We'll be feeding suggestions through as PRs. All suggestions foe improvement are welcome.

The purpose of the workshop is to get you started using Kubernetes so you can make your
own discoveries. You run Kubernetes on a virtual machine on your laptop, but you will
find that the knowledge you develop will be directly applicable to cloud-based systems.
You will learn by doing, and hopefully by talking to the presenter and your classmates.

Since the class is likely to be light on instructors, you are encouraged to share your
knowledge to help your classmates to make faster progress.

Home instructions
-----------------
Expand All @@ -8,25 +19,29 @@ Home instructions
* ~4 GB of RAM
* ~15 GB of free disk space
- Download & install virtualbox: https://www.virtualbox.org/wiki/Downloads
- Download & unzip our disk image: https://tinyurl.com/y9tvcsbj
- Download & unzip our disk image: https://tinyurl.com/y9tvcsbj
- Download & install ssh client (mac & linux have this usually installed), for windows:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- When following after the workshop at Pycon UK, see the guide at:
https://github.com/alixedi/pyconuk-2018-k8s

Session 1 - 90m
---------------
Class Content
-------------

1. Introduction to speakers
1. Introduction to speaker(s).

2. Learning objectives
2. After this class we hope you will be able to:
* Demonstrate Kubernetes to your colleagues.
* Deploy a web application on Kubernetes.
* Deploy a web application to Kubernetes.
* Manage your deployment e.g. scaling up and down, rolling updates and rollbacks.
* Deploy multiple services on Kubernetes.
* Describe the Kubernetes API to your colleagues.
* Describe the Kubernetes API.
* Demonstrate using kubectl to interact with the Kubernetes API.

Time limitations may mean you have to achieve some objectives after class.
All necessary steps for doing so are listed here, and all necessary files
are included in the repository.

3. Installation
* Laptop requirements:
* ~4 GB of RAM
Expand Down Expand Up @@ -195,7 +210,7 @@ Session 1 - 90m
`kubectl scale deployment webconsole --replicas 5`
* Look at the new pods: `kubectl get pods`
* Try and kill a pod - show that it gets recreated
`kubectl delete <pod-name>`
`kubectl delete pod <pod-name>`
* Simulate a service failure:
```python
import requests
Expand Down Expand Up @@ -360,4 +375,4 @@ Session 2 - 90m
* gcp/aws/digital ocean
* Other options: https://kubernetes.io/docs/setup/

11. Q&A
11. Q&A