Josh Bicking ea5a2dabc0 everything on k3s | 2 years ago | |
---|---|---|
.. | ||
examples | 2 years ago | |
monitoring | 2 years ago | |
nextcloud | 2 years ago | |
postgres | 2 years ago | |
rook | 2 years ago | |
README.md | 2 years ago | |
blog.yaml | 2 years ago | |
cloudflared.yaml | 2 years ago | |
gogs-pvc.yaml | 2 years ago | |
gogs.yaml | 2 years ago | |
jellyfin-pvc.yaml | 2 years ago | |
jellyfin.yaml | 2 years ago | |
matrix-pvc.yaml | 2 years ago | |
matrix.yaml | 2 years ago | |
plex-pvc.yaml | 2 years ago | |
plex.yaml | 2 years ago | |
selfoss-pvc.yaml | 2 years ago | |
selfoss.yaml | 2 years ago | |
temp-pvc-pod.yaml | 2 years ago | |
traefik-dashboard.yaml | 2 years ago | |
traefik-helmchartconfig.yaml | 2 years ago |
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --cluster-init" sh - export NODE_TOKEN=$(cat /var/lib/rancher/k3s/server/node-token) curl -sfL https://get.k3s.io | K3S_TOKEN=$NODE_TOKEN INSTALL_K3S_EXEC="server --server https://192.168.122.87:6443" INSTALL_K3S_VERSION=v1.23.6+k3s1 sh -
KUBECONFIG=/etc/rancher/k3s/k3s.yaml helm upgrade --install --create-namespace --namespace rook-ceph rook-ceph rook-release/rook-ceph:1.9.2 -f rook-ceph-values.yaml
KUBECONFIG=/etc/rancher/k3s/k3s.yaml helm install --create-namespace --namespace rook-ceph rook-ceph-cluster --set operatorNamespace=rook-ceph rook-release/rook-ceph-cluster:1.9.2 -f rook-ceph-cluster-values.yaml
If important data is on CephBlockPool-backed PVCs, don't forget to set the PV's persistentVolumeReclaimPolicy to Retain
.
If your setup divides k8s nodes into ceph & non-ceph nodes (using a label, like storage-node=true
), ensure labels & a toleration are set properly (storage-node=false
, with a toleration checking for storage-node
) so non-ceph nodes still run PV plugin Daemonsets.
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
wget https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda-repo-debian11-11-6-local_11.6.2-510.47.03-1_amd64.deb
sudo dpkg -i cuda-repo-debian11-11-6-local_11.6.2-510.47.03-1_amd64.deb
sudo apt-key add /var/cuda-repo-debian11-11-6-local/7fa2af80
.pub
sudo apt-get update
sudo apt install cuda nvidia-container-runtime nvidia-kernel-dkms
sudo apt install --reinstall nvidia-kernel-dkms
sudo vi /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau options nouveau modeset=0
sudo update-initramfs -u
Copy https://github.com/k3s-io/k3s/blob/v1.24.2%2Bk3s2/pkg/agent/templates/templates_linux.go into /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl (substitute your k3s version)
Edit the file:
<... snip> conf_dir = "{{ .NodeConfig.AgentConfig.CNIConfDir }}" {{end}} [plugins.cri.containerd.runtimes.runc] runtime_type = "io.containerd.runc.v2"
[plugins.cri.containerd.runtimes.runc.options] BinaryName = "/usr/bin/nvidia-container-runtime"
{{ if .PrivateRegistryConfig }} <... snip>
& then systemctl restart k3s
Label your GPU-capable nodes: kubectl label nodes <node name> gpu-node=true
& then install the nvidia device plugin:
helm repo add nvdp https://nvidia.github.io/k8s-device-plugin helm repo update KUBECONFIG=/etc/rancher/k3s/k3s.yaml helm upgrade -i nvdp nvdp/nvidia-device-plugin --version=0.12.2 --namespace nvidia-device-plugin --create-namespace --set-string nodeSelector.gpu-node=true
Ensure the pods on the namespace are Running.
Test GPU passthrough by applying examples/cuda-pod.yaml, then exec-ing into it & running nvidia-smi
.
Currently, 1 GPU = 1 pod can use the GPU.
sudo apt install ceph-fuse
sudo vi /etc/fstab
192.168.1.1.,192.168.1.2:/ /ceph ceph name=admin,secret=,x-systemd.mount-timeout=5min,_netdev,mds_namespace=data
https://unix.stackexchange.com/questions/554908/disable-spectre-and-meltdown-mitigations
https://rpi4cluster.com/monitoring/k3s-grafana/
Tried https://github.com/prometheus-operator/kube-prometheus. The only way to persist dashboards is to add them to Jsonnet & apply the generated configmap.
...
deluge? gogs ingress (can't go through cloudflare without cloudflared on the client)