====== Setup k3s ======
===== - K3s Installation =====
Install k3s:
curl -sfL https://get.k3s.io | sudo sh -
# Check for Ready node, takes maybe 30 seconds
k3s kubectl get node
Install helm:
wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
bash get-helm-3
Install portainer
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
helm repo add portainer https://portainer.github.io/k8s/
helm repo update
helm install --create-namespace -n portainer portainer portainer/portainer
export NODE_PORT=$(kubectl get --namespace portainer -o jsonpath="{.spec.ports[1].nodePort}" services portainer)
export NODE_IP=$(kubectl get nodes --namespace portainer -o jsonpath="{.items[0].status.addresses[0].address}")
echo https://$NODE_IP:$NODE_PORT
===== - K3S traefik tls =====
* https://www.alexhyett.com/traefik-vs-nginx-docker-raspberry-pi
==== - Cert-manager ====
* You have a couple of options installing cert-manager such as helm, arkade, manifests from github
* https://sysadmins.co.za/https-using-letsencrypt-and-traefik-with-k3s/
* Create letencrypt issuer
* https://www.howtogeek.com/devops/how-to-install-kubernetes-cert-manager-and-configure-lets-encrypt/
==== - Service and persistent storage ====
* https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/