fix: amend content (#14)

pull/24/head
Sarah Dayan 5 years ago committed by Rémy-Christophe Schermesser
parent 83a374193f
commit 69f8a2c03f

@ -2,19 +2,19 @@
1. [Prerequisites](#prerequisites)
1. [What it is not](#what-it-is-not)
1. [What is kubernetes? What is it used for?](#what-is-kubernetes-what-is-it-used-for)
1. [What is Kubernetes? What is it used for?](#what-is-kubernetes-what-is-it-used-for)
1. [Glossary](#glossary)
1. [The base building block: pod](#the-base-building-block-pod)
1. [Naming things: label and annotation](#naming-things-label-and-annotation)
1. [Deploying my first application: deployment](#deploying-my-first-application-deployment)
1. [Accessing my first application: service](#accessing-my-first-application-service)
1. [Running a background process: cronjob](#running-a-background-process-cronjob)
1. [The base building block: pods](#the-base-building-block-pods)
1. [Naming things: labels and annotations](#naming-things-labels-and-annotations)
1. [Deploying your first application: deployment](#deploying-my-first-application-deployment)
1. [Accessing your first application: service](#accessing-my-first-application-service)
1. [Running a background process: cronjobs](#running-a-background-process-cronjobs)
1. [Secrets](#secrets)
1. [Liveness and readiness probes, and how it impacts your pods](#liveness-and-readiness-probes,-and-how-it-impacts-your-pods)
1. [Resources, and how it impacts the scheduling](#resources,-and-how-it-impacts-the-scheduling)
1. [Improve the availability of your application: affinity and anti-affinity](#affinity-and-anti-affinity)
1. [Improve the availability of your application: pod disruptions budget](#pdb)
1. [Improve the elasticiy of your applications: HPA, VPA](#hpa-vpa)
1. [Improving the availability of your application: affinity and anti-affinity](#affinity-and-anti-affinity)
1. [Improving the availability of your application: pod disruptions budget](#pdb)
1. [Improving the elasticity of your applications: HPA, VPA](#hpa-vpa)
1. [Sidecar containers: what, why, and how](#sidecar-containers-what,-why,-and-how)
1. [Running a stateful application: volumes](#running-a-stateful-application-volumes)
1. [Running a stateful application: stateful-sets](#running-a-stateful-application-stateful-sets)
@ -26,21 +26,21 @@
## License
This hands-on in under the [CC BY-NC-SA](./LICENSE) license.
This hands-on course in under the [CC BY-NC-SA](./LICENSE) license.
![CC BY-NC-SA](https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png)
## Prerequisites
* brew: <https://brew.sh/>
* Homebrew: <https://brew.sh/>
```bash
```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
* docker: <https://docs.docker.com/docker-for-mac/install/>
* Docker: <https://docs.docker.com/docker-for-mac/install/>
```bash
```sh
open https://download.docker.com/mac/stable/Docker.dmg
```
@ -48,121 +48,128 @@ open https://download.docker.com/mac/stable/Docker.dmg
* minikube: <https://github.com/kubernetes/minikube>
```bash
$ brew cask install minikube
```sh
brew cask install minikube
minikube start
$ minikube start
[...]
🏄 Done! Thank you for using minikube!
$ minikube addons enable ingress
ingress was successfully enabled
minikube addons enable ingress
✅ ingress was successfully enabled
$ kubectl config current-context
kubectl config current-context
minikube
```
### (Optional) If you feel adventurous, only for macOS
You can try another lighter VM layer than Virtualbox
You can try another lighter virtual machine layer than Virtualbox
* docker-machine-driver-hyperkit: <https://github.com/moby/hyperkit>
* HyperKit: <https://github.com/moby/hyperkit>
```bash
```sh
brew install docker-machine-driver-hyperkit
```
And start minikube with
Then start minikube:
```bash
```sh
minikube start --vm-driver=hyperkit
```
If you have any issues:
If you're encountering any issues:
```bash
```sh
rm -rf ~/.minikube/
```
And start minikube without hyperkit
And start minikube without HyperKit:
```bash
```sh
minikube start
```
### Completion
If you are using zsh, you can add to your `.zshrc` file this to have autocomplete of `kubectl`:
If you are using Zsh, you can add the following to your `.zshrc` file to get autocomplete for `kubectl`:
```bash
```sh
if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)
fi
```
## What this is and what this is *not*
## What this course is and what it's *not*
### What this is
This is a hands on to start with using kubernetes (k8s). It starts from the basics and moves up in complexity.
At the end of this hands on you should be able to deploy an API in k8s that is accessible from the outside.
This is a hands-on course to get started with Kubernetes (k8s). It starts with the basics and moves up in complexity.
At the end of this course, you should be able to deploy an API in k8s that is accessible from the outside.
### What this is *not*
### What it's *not*
This is not a hands on on how to install/manage/deploy a k8s cluster.
This is neither a hands on to understand how k8s is working internally.
If this topic interests you, see [Kubernetes the hard way](https://github.com/kelseyhightower/kubernetes-the-hard-way).
This is not a course on how to install, manage or deploy a k8s cluster.
Neither is it a course to understand how k8s works internally.
However, if you're interested in this topic, see [Kubernetes The Hard Way](https://github.com/kelseyhightower/kubernetes-the-hard-way).
## What is k8s? What is it used for
k8s is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.
k8s is an open-source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.
k8s has a number of features. It can be thought of as:
k8s has a number of features. It can be seen as:
* a container platform,
* a microservices platform,
* a portable cloud platform and a lot more.
* a portable cloud platform, and a lot more.
k8s provides a container-centric management environment. It orchestrates computing, networking, and storage infrastructure on behalf of user workloads. This provides much of the simplicity of Platform as a Service (PaaS) with the flexibility of Infrastructure as a Service (IaaS), and enables portability across infrastructure providers.
## Glossary
* **yml/yaml**
* **YAML (yml)**
A markup language that relies on spaces & tabulation. All k8s configuration is written using yaml.
A markup language that relies on spaces and tabulations. All k8s configuration is written using YAML.
You will feel the pain of missing tabs & spaces.
Feel free to use a linter, <http://www.yamllint.com/.>
You will feel the pain of missing tabs and spaces. Feel free to use a linter, such as <http://www.yamllint.com/>.
* **container**
* **Container**
Containers are an abstraction at the app layer that packages code and dependencies together.
*Containers* are an abstraction at the app layer, which packages code and dependencies together.
* **(container) image**
* **(Container) image**
A lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
A lightweight, standalone, executable software package that includes everything you need to run an application: code, runtime, system tools, system libraries and settings.
* **docker**
* **Docker**
A software technology providing operating-system-level virtualization also known as containers.
A software technology providing operating-system-level virtualization, also known as containers.
Docker uses the resource isolation features of the Linux kernel such as cgroups and kernel namespaces, and a union-capable file system such as OverlayFS and others to allow independent “containers” to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines (VMs).
Docker uses the resource isolation features of the Linux kernel, such as cgroups and kernel namespaces, and a union-capable file system such as OverlayFS and others to allow independent “containers” to run within a single Linux instance. This avoids the overhead of starting and maintaining virtual machines (VMs).
* **kubectl**
The standard cli to interact with k8s, we will use it a lot.
The standard CLI to interact with k8s. We use it a lot in this course.
* **minikube**
A local k8s, useful for testing. We will use it during this hands on.
A local k8s cluster, useful for testing. We use it a lot in this course.
* **manifest**
* **Manifest**
k8s configuration files are called `manifest`. In reference to the `manifest` of a ship: A list or invoice of the passengers or goods being carried by a commercial vehicle or ship (from [wiktionary](https://en.wiktionary.org/wiki/manifest#Noun)).
k8s configuration files are called *manifests*. This is a reference to the list or invoice of the passengers or goods being carried by a commercial vehicle or ship (from [wiktionary](https://en.wiktionary.org/wiki/manifest#Noun)).
* **(k8s) objects**
k8s contains a number of abstractions that represent the state of your system: deployed containerized applications and workloads, their associated network and disk resources, and other information about what your cluster is doing. These abstractions are called `objects` and represented by a `kind` in the k8s API.
k8s contains a number of abstractions that represent the state of your system: deployed containerized applications and workloads, their associated network and disk resources, and other information about what your cluster is doing. These abstractions are called *objects*, and are represented by a *kind* in the k8s API.
* **(k8s) node**
A node is a worker machine in k8s.
A worker machine may be a VM or physical machine, depending on the cluster. It has the necessary services to run the workloads and is managed by the master components. The services on a node include Docker, `kubelet` and `kube-proxy`.
* **(k8s) cluster**
@ -172,33 +179,27 @@ A cluster has several worker nodes and at least one master node.
* **(k8s) master**
The Master is responsible for managing the cluster. The master coordinates all activities in your cluster, such as scheduling applications, maintaining applications desired state, scaling applications, and rolling out new updates.
k8s master automatically handles scheduling your services across the Nodes in the cluster. The Masters automatic scheduling takes into account the available resources on each Node.
* **(k8s) node**
A node is a worker machine in k8s.
The *master* is responsible for managing the cluster. It coordinates all activities in your cluster, such as scheduling applications, maintaining applications desired state, scaling applications, and rolling out new updates.
A worker machine may be a VM or physical machine, depending on the cluster. It has the Services necessary to run the services and is managed by the master components. The Services on a node include Docker, `kubelet` and `kube-proxy`.
A k8s master automatically handles the scheduling of your services across nodes in the cluster. The masters automatic scheduling takes the available resources of each node into account.
## The base building block: `pod`
## The base building block: pods
See the dedicated [README](05-pods).
## Naming things: `label` and `annotation`
## Naming things: labels and annotations
See the dedicated [README](06-label-annotation).
## Deploying my first application: `deployment`
## Deploying my first application: deployment
See the dedicated [README](07-deployment).
## Accessing my first application: `service`
## Accessing my first application: service
See the dedicated [README](08-service).
## Running a background process: `cronjob`
## Running a background process: cronjobs
See the dedicated [README](09-cronjob).
@ -230,11 +231,11 @@ See the dedicated [README](15-hpa-vpa).
See the dedicated [README](16-sidecar-containers).
## Running a stateful application: `volumes`
## Running a stateful application: volumes
See the dedicated [README](17-volumes).
## Running a stateful application: `stateful sets`
## Running a stateful application: stateful sets
See the dedicated [README](18-stateful-sets).

Loading…
Cancel
Save