BlockCat / k8s-nas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

K8s

About this project

This is a project that describes my nas setup. It is a continous work in progress.

How to get started

Apply the kustomization file:

kubectl apply -k ./k8s

Applications

Syncs files between devices.

  • pvc

Monitors websites for changes.

  • pvc
  • no samba

Image Scanner for Security

Scans images for vulnerabilities using Trivy

Torrent client with VPN. There is an image that combines both.

  • pvc
  • samba:rw

A Media server with DLNA.

  • pvc
  • samba:rw

A web app for managing a collection of movies and series.

  • pvc
  • samba:ro

Samba

We need a way to connect to the storage from PCs, because that is ez.

We can use the samba operator: https://github.com/samba-in-kubernetes/samba-operator

ArgoCD

Manages the cluster, deploys applications, etc.

Backup and restore for Kubernetes using blackblaze b2 as external storage.

Traefik + Let's Encrypt

Manages routing into services using the domain name. Also manages SSL certificates using Let's Encrypt.

How to Install

Requirements:

Routes:

Service Domain notes
Traefik - Dashboard traefik.localhost local
ArgoCD - Dashboard argocd.localhost local
Changedetection.io (changedetection | cd).localhost public
Jellyfin jellyfin.localhost public
Syncthing - service syncthing.localhost public
Syncthing - dashboard syncthing.localhost local
Immich immich.localhost public
Samba --- local

Cloudflare tunnel

Allows us to connect to the cluster from anywhere. Preferably we connect tunnel pod to the ingress.

Cloudflare should only have access public facing ingress routes.

Security

Stuff enters via CloudFlared Tunnel. This tunnel should only have access to Ingress/Traefik, and nothing else. Traefik should not have access to anything, only to the ingress routes.

All pods should default to not having access to anything, and only have access to what they need by using network policies.

Phase 1:

Applications:

  • Traefik
  • Tunnel
  • ArgoCD

Configuration:

  • Traefik ingress route to ArgoCD
  • Block all traffic by default
  • Allow traffic from tunnel to ingress (traefik)
  • Allow traffic from traefik to ingress routes

About