ops(k8s): replace k3s with k8s, provide bootstrap, ty @duckfullstop

This commit is contained in:
Kat Inskip 2024-01-19 14:31:24 -08:00
parent 067d72b8a8
commit fc67b7a2e5
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
9 changed files with 266 additions and 47 deletions

12
k8s/bootstrap.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env -S nix shell nixpkgs#kubernetes-helm --command bash
echo "Installing flannel (CNI/Network Fabric)"
kubectl create ns kube-flannel
kubectl label --overwrite ns kube-flannel pod-security.kubernetes.io/enforce=privileged
helm repo add flannel https://flannel-io.github.io/flannel/
helm install flannel --set podCidr="10.42.0.0/16" --namespace kube-flannel flannel/flannel
echo "Installing CoreDNS (Cluster DNS)"
helm repo add coredns https://coredns.github.io/helm
helm --namespace=kube-system install coredns coredns/coredns --set service.clusterIP=10.43.0.2
echo "Installing ArgoCD (GitOps)"
helm repo add argo https://argoproj.github.io/argo-helm
helm install argocd argo/argo-cd --namespace argocd --create-namespace

View file

@ -11,9 +11,11 @@ spec:
chart: coredns
helm:
valuesObject:
services:
clusterIP: 10.43.0.2
destination:
namespace: kube-system
name: in-cluster
syncPolicy:
syncOptions:
- ServerSideApply=true
- ServerSideApply=true