https://github.com/maxwlang/argocd-homelab
My homelab kubernetes stack
https://github.com/maxwlang/argocd-homelab
Last synced: 3 months ago
JSON representation
My homelab kubernetes stack
- Host: GitHub
- URL: https://github.com/maxwlang/argocd-homelab
- Owner: maxwlang
- Created: 2024-02-08T03:48:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-02T03:33:01.000Z (5 months ago)
- Last Synced: 2026-02-02T03:42:39.588Z (5 months ago)
- Language: Mustache
- Homepage:
- Size: 590 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-k8s.md
Awesome Lists containing this project
README
# Setup
## Initial cluster setup
1. Create cluster
2. Install ArgoCD
1. `cd install`
2. `kubectl create namespace argocd`
3. Apply secrets
1. `kubectl apply -f ../secrets/repo-secret.yaml`
2. `kubectl apply -f ../secrets/sops-age-secret.yaml`
4. `helm install argo-cd argo-cd/ --namespace argocd --values values-override.yaml`
3. Expose ArgoCD to loadbalencer
1. `kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'`
4. Login to ArgoCD
1. `kubectl port-forward svc/argocd-server -n argocd 8080:443`
2. `argocd admin initial-password -n argocd`
3. [Login](https://localhost:8080) with admin:
4. Change password
5. Allow ArgoCD to manage itself
1. `cd install`
2. `helm upgrade argocd ./argo-cd --namespace=argocd --create-namespace -f values-override.yaml`
## Setup nvidia plugin
1. Install nvidia driver on agent 1
1. `sudo apt install gcc build-essential -y && wget http://international.download.nvidia.com/XFree86/Linux-x86_64/545.29.06/NVIDIA-Linux-x86_64-545.29.06.run && sudo chmod +x NVIDIA-Linux-x86_64-545.29.06.run && sudo ./NVIDIA-Linux-x86_64-545.29.06.run`
2. Let the installer disable nouveau, patch initramfs, then reboot
3. `sudo ./NVIDIA-Linux-x86_64-545.29.06.run`
4. reboot
2. Apply nvidia driver patches
1. `sudo mkdir /opt/nvidia && sudo chown -R $USER /opt/nvidia && cd /opt/nvidia && git clone https://github.com/keylase/nvidia-patch && cd nvidia-patch && sudo bash patch.sh && sudo bash patch-fbc.sh`
3. Install nvidia container toolkit
1. Follow https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-apt
2. Or just run this:
```bash
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && sudo apt update && sudo apt install -y nvidia-container-toolkit
4. Install nvidia plugin
1. Follow https://github.com/NVIDIA/k8s-device-plugin#configure-containerd
5. Test cuda
1. Pull image `sudo ctr image pull docker.io/nvidia/cuda:12.3.1-base-ubuntu20.04`
2. Run image `sudo ctr run --rm --gpus 0 -t docker.io/nvidia/cuda:12.3.1-base-ubuntu20.04 nvidia-smi`
6. Reboot agent 1
7. Test cuda on kubernetes
```bash
cat <