zimmertr/Kubernetes-Manifests
Tentang
A collection of my Kubernetes Manifests managed by Kustomize & ArgoCD
Sistem dan infrastrukturPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- 0
- dalam 15 hari
- -1
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliKubernetes Manifests
Summary
A collection of services I deploy to Kubernetes with Argo CD using TKS.
Instructions
Cloud Controller Manager
If TKS's cluster.external_cloud_provider is on, nodes stay tainted until the Proxmox CCM runs, so install it first. See its README for populating config.yaml.
kubectl create secret generic proxmox-cloud-controller-manager -n kube-system \
--from-file=config.yaml=misc/proxmox-cloud-controller-manager/configs/config.yaml
kustomize build --enable-helm misc/proxmox-cloud-controller-manager | kubectl apply -f-
Networking
Istio
Assuming you're using TKS with Flannel, Istio can be used to set up Metal LB & Istio:
# The first apply creates MetalLB's CRDs and controller, but its pools can't be
# created until the controller's webhook is up. Wait for it and apply again.
kustomize build istio/metallb | kubectl apply -f-
kubectl -n metallb-system rollout status deploy/controller
kustomize build istio/metallb | kubectl apply -f-
kustomize build --enable-helm istio/istio | kubectl apply -f-
kustomize build --enable-helm istio/istio-gateway | kubectl apply -f-
Cilium
Assuming you're using TKS and have disabled Flannel, Cilium Can be used to install Cilium and Gateway API:
kustomize build --enable-helm cilium/gateway-api | kubectl apply -f-
kustomize build --enable-helm cilium/cilium | kubectl apply -f-
kustomize build --enable-helm misc/kubelet-csr-approver | kubectl apply -f-
Argo CD
Argo CD is deployed manually at first using the same Kustomize pattern:
kustomize build --enable-helm argo/argo-cd | kubectl apply -f- --server-side --force-conflicts
Then bootstrap the rest of the cluster with the app-of-apps pattern, recursively discovering AppProjects and ApplicationSets:
kubectl apply -f root-appproject.yml
# The projects are created by Argo in the background. ApplicationSets that
# start before theirs exists fail until their next refresh minutes later.
kubectl -n argo-system wait application/root-appprojects --for=jsonpath='{.status.sync.status}'=Synced --timeout=5m
kubectl apply -f root-applicationset.yml
Secrets and Volumes
Argo CD cannot create Secret resources since they're not tracked in this repo. And cannot create any statically referenced persistent volumes. So they must be created by hand.
Create any ZFS volumes the statically provisioned Proxmox CSI PersistentVolume resources point at:
zfs create -s -V 100G FlashPool/vm-9999-Prometheus-Data
zfs create -s -V 10G FlashPool/vm-9999-AlertManager-Data
zfs create -s -V 1G FlashPool/vm-9999-Grafana-Data
zfs create -s -V 50G FlashPool/vm-9999-Jellyfin-Cache
zfs create -s -V 50G FlashPool/vm-9999-Jellyfin-Config
zfs create -s -V 10G FlashPool/vm-9999-ruTorrent-Data
zfs create -s -V 10G FlashPool/vm-9999-Sonarr-Data
zfs create -s -V 500G FlashPool/vm-9999-AI-Models
zfs create -s -V 10G FlashPool/vm-9999-Open-WebUI-Data
zfs create -s -V 10G FlashPool/vm-9999-LiteLLM-Postgres-Data
The Cloudflare tunnel, DNS records and cert-manager API token are applied by zimmertr/yggdrasil. Run terraform -chdir=../yggdrasil/terraform/cloudflare init from here, with yggdrasil checked out beside this repo.
Create any Secret resources using the Terraform outputs:
# Cloudflared and Cert-Manager
kubectl create secret generic cloudflared-token -n cloudflared-system \
--from-literal=token="$(terraform -chdir=../yggdrasil/terraform/cloudflare output -raw tunnel_token)"
kubectl create secret generic cloudflare-api-token -n cert-manager \
--from-literal=api-token="$(terraform -chdir=../yggdrasil/terraform/cloudflare output -raw cert_manager_token)"
# Proxmox CSI Plugin
# See storage/proxmox-csi-plugin/README.md
kubectl create secret generic proxmox-csi-plugin -n csi-proxmox \
--from-file=storage/proxmox-csi-plugin/configs/config.yaml
# Grafana
kubectl create secret generic grafana-admin -n prometheus-system \
--from-literal=admin-user=admin --from-literal=admin-password='CHANGEME'
# llama-swap
kubectl create secret generic llama-swap-api-key -n llama-swap-system \
--from-literal=api-key="sk-$(openssl rand -hex 24)"
kubectl create secret generic llama-swap-hf-token -n llama-swap-system \
--from-literal=token='CHANGEME'
# Open WebUI
# Its llama-swap API key is stored in both namespaces.
OPEN_WEBUI_API_KEY="sk-$(openssl rand -hex 24)"
kubectl create secret generic llama-swap-open-webui-api-key -n llama-swap-system \
--from-literal=api-key="$OPEN_WEBUI_API_KEY"
kubectl create secret generic open-webui-llama-swap-api-key -n open-webui-system \
--from-literal=api-key="$OPEN_WEBUI_API_KEY"
kubectl create secret generic open-webui-admin -n open-webui-system \
--from-literal=email='CHANGEME' --from-literal=password='CHANGEME'
kubectl create secret generic open-webui-secret-key -n open-webui-system \
--from-literal=secret-key="$(openssl rand -hex 32)"
# LiteLLM
# Its llama-swap API key is stored in both namespaces.
LITELLM_API_KEY="sk-$(openssl rand -hex 24)"
kubectl create secret generic llama-swap-litellm-api-key -n llama-swap-system \
--from-literal=api-key="$LITELLM_API_KEY"
kubectl create secret generic litellm-llama-swap-api-key -n litellm-system \
--from-literal=api-key="$LITELLM_API_KEY"
kubectl create secret generic litellm-master-key -n litellm-system \
--from-literal=master-key="sk-$(openssl rand -hex 24)"
# Hex, because LiteLLM puts the password in a connection URL.
kubectl create secret generic litellm-postgres -n litellm-system \
--from-literal=superuser-password="$(openssl rand -hex 24)" \
--from-literal=database=litellm --from-literal=username=litellm \
--from-literal=password="$(openssl rand -hex 24)"
# Bluebird Forecast
# A login that can only read the shared cache, for the PR previews
# (zimmertr/bluebird#760). Hex, because the password goes in a connection URL.
BLUEBIRD_PREVIEW_PASSWORD="$(openssl rand -hex 24)"
kubectl create secret generic bluebird-database-preview -n bluebird-system \
--type=kubernetes.io/basic-auth \
--from-literal=username=bluebird_preview --from-literal=password="$BLUEBIRD_PREVIEW_PASSWORD"
kubectl create secret generic bluebird-database-preview -n bluebird-pr-system \
--from-literal=uri="postgresql://bluebird_preview:${BLUEBIRD_PREVIEW_PASSWORD}@bluebird-database-rw.bluebird-system:5432/app"
# Mountaineers Activity Scraper
# See misc/mountaineers-activity-scraper/README.md
kubectl create secret generic mountaineers-activity-scraper-creds -n mountaineers-activity-scraper-system \
--from-file=misc/mountaineers-activity-scraper/files/google_cloud_credentials.json
# hevy-garmin-sync
# See misc/hevy-garmin-sync/README.md
# The session is the whole auth2.0-token cookie value from hevy.com, pasted as
# is. Leave it out to run without Hevy Trainer.
kubectl create secret generic hevy-garmin-sync -n hevy-garmin-sync-system \
--from-literal=HEVY_API_KEY='CHANGEME' \
--from-literal=GARMIN_TOKEN='CHANGEME' \
--from-literal=HEVY_SESSION='CHANGEME'
# Strava Heatmap Proxy
# See public/strava-heatmap-proxy/README.md
kubectl create secret generic strava-heatmap-proxy-cookies -n strava-heatmap-proxy-system \
--from-file=strava-cookies.json=public/strava-heatmap-proxy/files/strava-cookies.json \
--dry-run=client -o yaml | kubectl apply -f-
Jelajahi proyek terkait
Memuat…