add some yaml

This commit is contained in:
Ricardo (XenGi) Band 2022-08-15 21:31:37 +02:00
commit 1530c2939e
Signed by: xengi
GPG key ID: 56376B6BA63CC9F7
5 changed files with 117 additions and 14 deletions

View file

@ -0,0 +1,40 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: my-deployment
namespace: my-namespace
labels:
app: web
spec:
selector:
matchLabels:
app: web
replicas: 3
template:
metadata:
labels:
app: web
spec:
containers:
- name: nginx
image: docker.io/nginxinc/nginx-unprivileged:stable
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
protocol: TCP
volumeMounts:
- name: webroot
mountPath: /usr/share/nginx/html
securityContext:
allowPrivilegeEscalation: false
runAsUser: 1000
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumes:
- name: webroot
persistentVolumeClaim:
claimName: my-pvc
restartPolicy: Always

View file

@ -0,0 +1,6 @@
---
kind: Namespace
apiVersion: v1
metadata:
name: my-namespace

View file

@ -0,0 +1,15 @@
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-pvc
namespace: my-namespace
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
storageClassName: default

View file

@ -0,0 +1,14 @@
---
kind: Service
apiVersion: v1
metadata:
name: my-service
namespace: my-namespace
spec:
selector:
app: web
ports:
- port: 80
targetPort: 8080
protocol: TCP

View file

@ -58,7 +58,8 @@ The emojis probably make no sense, ignore them if they confuse you.
# Agenda part 2 - Advanced topics
- 🏭 Deployments
- ? StatefulSets
- 🧰 DaemonSet
- 🗃️ StatefulSets
- 🌐 Ingress Controller
- 📑 Cluster DNS
- 💾 Container Storage Interface (CSI)
@ -137,15 +138,27 @@ Example: Simple PHP app
---
# You survived, take a cookie!
# :cookie:
---
# 💣 Hands on
Let's deploy a simple web app with a volume.
---
# 🏭 Deployments
---
# 🏘️ ReplicaSets
# 🧰 DaemonSets
---
# ? StatefulSets
# 🗃️ StatefulSets
---
@ -171,21 +184,36 @@ Example: Simple PHP app
---
# Containers - Hands on
# Kubernetes distribution
```shell
$ podman run -it --rm docker.io/debian:stable
- 💻 On bare metal
- [RedHat OpenShift][openshift]
- [OKD][okd]
- [Rancher][rancher]
- [k3s][k3s]/[k3os][k3os] ([RaspberryPi][rpi])
- ⛅ In the cloud:
- Amazon (EKS, ECS)
- Google (GCP)
$ systemctl --user status user.slice
[openshift]: https://www.redhat.com/en/technologies/cloud-computing/openshift
[okd]: https://www.okd.io/
[rancher]: https://rancher.com/
[k3s]: https://k3s.io/
[k3os]: https://k3os.io/
[rpi]: https://www.raspberrypi.com/
$ podman-compose up
```
---
<!--
- Fooooooo
- also bar
- and baz!
-->
# Still not enough?
- 🔑 Secrets
- 📡 Control Plane
- 🔩 Operators
- 🕑 Jobs and CronJobs
- 🗺️ ConfigMaps
- 🔐 Pod Security Policies
- 🪪 Role Based Access Control (RBAC)
- 🪵 Resource Quotas
---