February 2024 | Vašek Lorenc
What you won't learn today
What you might learn
Not a brand new idea
namespaces
cgroups
overlay filesystem
containers
images
Dockerfilehub
Drives building of container images
# syntax=docker/dockerfile:1
FROM node:18-alpine
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
EXPOSE 3000Containers are NOT VMs
Docker isn't the only containerization runtime
podman, containerd, runC, rkt, ...We could go deeper!
Mapping resources from the host system
Not going there today
Multiple services needed!
Standardized YAML configuration file
$ docker compose up webdocker-compose.yml
services:
web:
build: .
ports:
- "8000:5000"
volumes:
- .:/code
- logvolume01:/var/log
depends_on:
- redis
redis:
image: redis
volumes:
logvolume01: {}The "F" in
Kubernetes
stands for "FUN".
Sometimes, we need more
microservices!
workload
pod
node
cluster
scheduling
apiVersion: v1
kind: Pod
metadata:
name: marcocodes-web
spec:
containers:
- image: gcr.io/marco/marcocodes:1.4
name: marcocodes-web
ports:
- containerPort: 8080
name: http
protocol: TCPsample-pod.yml
TBD
Resiliency & Load Balancing
apiVersion: apps/v1
kind: ReplicaSet
# metadata:
# ...
spec:
replicas: 2
selector: "you will learn this later"
# ...
template:
metadata: "you will learn this later"
# ...
spec:
containers:
- name: marcocodes-web
image: "gcr.io/marco/marcocodes:3.85"sample-pod-replicas.yml
Resiliency & Load Balancing
However
Not-so-static (micro)services
"Packages" for Kubernetes
Example: WordPress Helm Chart
$ helm install my-release oci://registry-1.docker.io/bitnamicharts/wordpressWhat else we need to consider/build/maintain/learn?
What else we need to consider/build/maintain/learn?
What else we need to consider/build/maintain/learn?
DP Stratus
Current DP
walle_p, dl_p, borg_p)Press F for fun.