rename folder
8
kubernetes_101/Makefile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
pdf:
|
||||
marp --pdf --pdf-notes .
|
||||
|
||||
present:
|
||||
marp -w -s --bespoke.progress .
|
||||
|
||||
notes:
|
||||
marp --notes .
|
||||
16
kubernetes_101/README.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Kubernetes 101
|
||||
|
||||
An introduction
|
||||
|
||||
Run slides with:
|
||||
|
||||
```shell
|
||||
make present
|
||||
```
|
||||
|
||||
Generate PDF with:
|
||||
|
||||
```shell
|
||||
make pdf
|
||||
```
|
||||
|
||||
BIN
kubernetes_101/avatar.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
4
kubernetes_101/container.drawio.svg
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
208
kubernetes_101/index.md
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
---
|
||||
title: Kubernetes 101
|
||||
description: An introduction
|
||||
author: Ricardo Band
|
||||
keywords: kubernetes,container,basics
|
||||
---
|
||||
<!-- theme: default -->
|
||||
<!-- class: invert -->
|
||||
|
||||

|
||||
|
||||
# Kubernetes 101
|
||||
|
||||
## An introduction
|
||||
|
||||
---
|
||||
|
||||
# Stuff you should already know
|
||||
|
||||
- Containers
|
||||
- Container engines
|
||||
- [docker][docker], [podman][podman] :heart:
|
||||
- Bonus points for:
|
||||
- [docker-compose][docker-compose]
|
||||
- [podman-compose][podman-compose]
|
||||
|
||||
[docker]: https://www.docker.com/
|
||||
[podman]: https://podman.io/
|
||||
[docker-compose]: https://docs.docker.com/compose/
|
||||
[podman-compose]: https://github.com/containers/podman-compose
|
||||
|
||||
<!--
|
||||
- podman can run root less
|
||||
- there is a docker-compose equivalent
|
||||
- compose is basically running a kubernetes like deployment
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
# Agenda part 1 - The basics
|
||||
|
||||
- 🧑 Workloads aka your app
|
||||
- 🛋️ Environment
|
||||
- 📦 Containers
|
||||
- 🏡 Pods
|
||||
- 🏘️ ReplicaSets
|
||||
- 🏪 Services
|
||||
- 💾 Volumes
|
||||
- 🌆 Namespaces
|
||||
|
||||
<!--
|
||||
If you want to explain it to your kid, you can stop after this.
|
||||
The emojis probably make no sense, ignore them if they confuse you.
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
# Agenda part 2 - Advanced topics
|
||||
|
||||
- 🏭 Deployments
|
||||
- ? StatefulSets
|
||||
- 🌐 Ingress Controller
|
||||
- 📑 Cluster DNS
|
||||
- 💾 Container Storage Interface (CSI)
|
||||
- 🕸️ Container Network Interface (CNI)
|
||||
- 👮 Network Policies
|
||||
- 🃏 Custom Resources
|
||||
|
||||
<!-- It's ok if you zone out somewhere around here. -->
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 🧑🛋️ Workloads and their environment
|
||||
|
||||
Example: Simple PHP app
|
||||
|
||||
- index.php
|
||||
- PHP runtime ([php-fpm][php-fpm])
|
||||
- Webserver ([NGINX][nginx])
|
||||
- OS ([Alpine][alpine])
|
||||
|
||||
[php-fpm]: https://www.php.net/manual/en/install.fpm.php
|
||||
[nginx]: https://www.nginx.com/
|
||||
[alpine]: https://www.alpinelinux.org/
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 📦 Containers
|
||||
|
||||
- Isolated environment
|
||||
- Linux namespace and cgroups
|
||||
- Networking?
|
||||
- Persistant storage?
|
||||
- Scheduling, Load balancing
|
||||
|
||||
<!-- Networking: I smell another talk around here -->
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 🏡 Pods
|
||||
|
||||
- "Runnable unit of work"
|
||||
- Holds Containers
|
||||
- Connects to overlay network
|
||||
- Container runtime interfaces (CRI)
|
||||
- containerd, CRI-O, Docker
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 🏘️ ReplicaSets
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 🏪 Services
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 💾 Volumes
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# 🌆 Namepaces
|
||||
|
||||
---
|
||||
|
||||
# 🏭 Deployments
|
||||
|
||||
---
|
||||
|
||||
# 🏘️ ReplicaSets
|
||||
|
||||
---
|
||||
|
||||
# ? StatefulSets
|
||||
|
||||
---
|
||||
|
||||
# 🌐 Ingress Controller
|
||||
|
||||
---
|
||||
|
||||
# 📑 Cluster DNS
|
||||
|
||||
---
|
||||
|
||||
# 💾 Container Storage Interface (CSI)
|
||||
|
||||
---
|
||||
|
||||
# 🕸️ Container Netrwork Interface (CNI)
|
||||
|
||||
## 👮 Network Policies
|
||||
|
||||
---
|
||||
|
||||
# 🃏 Custom Resource
|
||||
|
||||
---
|
||||
|
||||
# Containers - Hands on
|
||||
|
||||
```shell
|
||||
$ podman run -it --rm docker.io/debian:stable
|
||||
|
||||
$ systemctl --user status user.slice
|
||||
|
||||
$ podman-compose up
|
||||
```
|
||||
|
||||
<!--
|
||||
- Fooooooo
|
||||
- also bar
|
||||
- and baz!
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
# Sources
|
||||
|
||||
- [Kubernetes Children’s Guide](https://www.cncf.io/phippy/the-childrens-illustrated-guide-to-kubernetes/)
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
```
|
||||
|
||||
--
|
||||
|
||||
by Ricardo Band
|
||||
|
||||
mailto:email@ricardo.band
|
||||
https://www.ricardo.band/
|
||||
```
|
||||
84
kubernetes_101/k8s.svg
Normal file
|
After Width: | Height: | Size: 11 KiB |
4
kubernetes_101/namespace.drawio.svg
Normal file
|
After Width: | Height: | Size: 19 KiB |
4
kubernetes_101/pod.drawio.svg
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
4
kubernetes_101/replicaset.drawio.svg
Normal file
|
After Width: | Height: | Size: 10 KiB |
4
kubernetes_101/service.drawio.svg
Normal file
|
After Width: | Height: | Size: 14 KiB |
4
kubernetes_101/volume.drawio.svg
Normal file
|
After Width: | Height: | Size: 17 KiB |
4
kubernetes_101/workload.drawio.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Do not edit this file with editors other than diagrams.net -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="281px" height="93px" viewBox="-0.5 -0.5 281 93" content="<mxfile host="app.diagrams.net" modified="2022-08-15T17:57:30.064Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36" etag="8T4T4GvS5o7vvjfIpq0B" version="20.2.4" type="gitlab"><diagram id="rceTEQIyEpd4c1Ait2VS" name="Page-1">5ZZdb5swFIZ/DdJ2sYmvpLltszTZ1rWTUmnT7rxwAm4NB5mTAPv1s4MJuKxNOiU3G5Ei/PjY5rznA5xgmlZzyfLkC0YgHN+NKif44Ph+GI7VvwZ1A8ah14BY8qhBPbDkv8BA19ANj6CwDAlREM9tuMIsgxVZjEmJpW22RmGfmrMYBmC5YmJIv/GIkoZORm7HF8DjpD3Zc81MylpjA4qERVj2UDBzgqlEpOYuraYgtHatLs2662dm9w8mIaNjFiwoChef7+jh5lP16N3/uKNy9s5vdtkysTEOm4elulVA4iaLQG/iOcFVmXCCZc5WerZUIVcsoVSY6TUXYooC5W5tsB7pn+aYUY83l+IFSXyE3sx4d6mZoXvG4y1IgqqHjLtzwBRI1sqkTT6jfG0Pyy6OXhucpBfDiWHMpE6837hTV90YgV8htndYbLWLymw4LPQJ5JnY8oyH8oR/UCc8lzrjoRiRKkUzREkJxpgxMevoVZebrhp1NjeIuRHqAYhq01fYhtCWEbLoUncJfYKKS0OuuTgoc4EbuYIX3AlMs2IyBjqcFNrXF4MmQTDiW7stnTwIwSBFuRK4ep8n+SA8Ks3IVtOu5gwzeNISDGKCx5kaCljrHXTKctVyLw1OeRSJ52rADrnuKya4XniasvDdJ3UxOq5tBOcqjIt/qzDCIwvDP3Vh7JYqp1jdM8iRZ1T0dv6qQZcN3oWdDZ43st+yr7NXN80TdOmwd+XvMyQcVG0JPwuQKukVfnM7/3j7XZ+sKimBt/9rIe8/zc5QyWrYfck1Ye0+h4PZbw==</diagram></mxfile>" resource="https://app.diagrams.net/?src=about#AXenGi%2Fslides%2Fmain%2Fkubernetes%20101%2Fworkload.drawio.svg"><defs/><g><rect x="0" y="0" width="120" height="80" rx="12" ry="12" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><ellipse cx="60" cy="40" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><path d="M 160 40 L 83 40" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="80" cy="40" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="160" y="25" width="120" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 40px; margin-left: 162px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">index.php</div></div></div></foreignObject><text x="162" y="44" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">index.php</text></switch></g><path d="M 160 75 L 130 75 L 123 75" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="120" cy="75" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="160" y="60" width="120" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 118px; height: 1px; padding-top: 75px; margin-left: 162px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 14px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">webserver (NGINX/Apache)</div></div></div></foreignObject><text x="162" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="14px">webserver (NGINX/...</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |