Kubernetes is a wildly extensible, configurable, enterprise grade orchestration platform which drives many of the largest presences on the web.
The problem solution space is
# Install snapd
sudo apt install snapd
# Install the latest microk8s snap
# (can be made explicit with --channel=latest/stable
# or use specific channel from `snap info microk8s`)
sudo snap install microk8s --classic
# Add your user to the microk8s group
usermod -a G microk8s $USER
newgrp microk8s
# Check MicroK8s status and list available/enabled addons
microk8s status
# Install the ingress and cert-manager addons
microk8s enable ingress cert-manager
Or any container, but if you want transparent logging, redirect to stdout and stderr, which the default nginx container does for you!
FROM nginx
COPY html /usr/share/nginx/html
# build / tag
sudo docker build -t \
microk8s.sideload/seagl00.k8s.jp.net:v000 seagl00/
# sideload import to microk8s
sudo docker save microk8s.sideload/seagl00.k8s.jp.net:v000 |\
microk8s image import
# list images
microk8s ctr images list
Grab example yamls from the example repo
microk8s kubectl apply -f ./seagl00.yaml
microk8s kubectl apply -f ./seagl01.yaml
microk8s kubectl apply -f ./ingress.yaml
Same command with replace instead of apply for updates!
Slides:
[JS seagl2023.slides.k8s.jp.net]
[PDF talk.jpnc.info/k8s-simple-sites.jpnc.seagl2023.pdf]
Example code:
git.jpnc.info/simple_sites.k8s.examples/tree/seagl2023
Example sites:
seagl00.k8s.jp.net seagl01.k8s.jp.net