Skip to content

aidun/kubernetes_homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homelab Bootstrap

The intention of the repo is to create a full featured homelab / mini cluster which can run on arm and amd64 machines.

Current Status

  • Gitops: Fluxcd
  • Gitops: Helm-Operator
  • Storage: Openebs
  • Ingress-Remote: Inlets
  • Ingress-Local: Metallb
  • Ingress: Nginx
  • Ingress: TLS
  • Monitoring - Logs: Loki
  • Monitoring - Logs: Grafana
    • Grafana
    • auto provisioning of datasource and dashboard
  • Monitoring - Merics: Prometheus
  • Secret-Management - Sealed Secrets
  • External-DNS - external-dns

Requirements

Install k3s

k3sup install --ip <IP OF THE PI> --user <USER> --k3s-extra-args "--no-deploy=traefik,svclb"
export KUBECONFIG=/PATH/TO/KUBECONFIG

I removed traefik an the svclb in favor for nginx. I had some trouble with traefik :-/ I need to invest more time here.

Setup the "real" system

All system tools should be installed in the kube-system namespace.

kubens kube-system

Openebs should be installed at first, to get distributed storage for all other tools:

#TODO: not working arm helm chart
#helm repo update
#helm upgrade -i openebs --namespace kube-system stable/openebs --version 1.7.0 --set defaultStorageConfig.enabled=true
kubectl apply -f https://raw.githubusercontent.com/openebs/charts/master/docs/openebs-operator-arm-dev.yaml
k annotate sc openebs-snapshot-promoter storageclass.kubernetes.io/is-default-class=true

The GCE token is not managed bei flux, so I had to add it manually.

kubectl create secret generic inlets-access-key --from-file=inlets-access-key=gce-token.json

The helm-operator and flux are installed first time by hand. After the bootstrap both should be managed by flux.

helm upgrade -i helm-operator fluxcd/helm-operator --namespace kube-system --set git.ssh.secretName=flux-git-deploy --set helm.versions=v3 --set image.repository=docker.io/onedr0p/helm-operator --set image.tag=latest

helm upgrade -i flux fluxcd/flux --wait --namespace kube-system --set image.repository=docker.io/onedr0p/flux --set git.user=aidun --set git.email=aidun@users.noreply.github.com --set git.url=git@github.com:aidun/kubernetes_homelab --set git.path='namespaces\,workloads\,releases' --set image.tag=latest

The last step is to get the public key of flux and add it to the github deploy keys.

fluxctl identity --k8s-fwd-ns kube-system

Now you have to wait several minutes. Maybe it needs some loops of the flux sync to get it all installed correct. To follow the progress watch the logs of flux.

kubectl logs deployment.apps/flux

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published