Configuration for my self-hosted software deployed to Kubernetes.
Go to file
Rob Watson 3a3bbe2ab7 feat(nginx): add robots.txt 2024-01-13 14:17:34 +01:00
deploy feat(nginx): add robots.txt 2024-01-13 14:17:34 +01:00
kind Add solar-toolkit-gateway configuration 2022-07-13 22:33:45 +02:00
.drone.yml ci: add kube-linter 2023-09-11 23:14:43 +02:00
.gitattributes chore: add .gitattributes 2023-09-12 08:35:50 +02:00
.gitignore Add basic Kustomize build flow 2022-05-05 22:52:43 +02:00
.kube-linter.yaml chore(linter): ignore latest-tag 2023-10-08 19:50:58 +02:00
LICENSE Add LICENSE 2022-06-06 21:46:41 +02:00
Makefile chore(linter): ignore latest-tag 2023-10-08 19:50:58 +02:00
README.md docs: update README.md 2024-01-13 13:10:53 +01:00
picture.jpg Update README 2022-05-05 23:00:30 +02:00

README.md

Netflux on Kubernetes

This repo contains Kubernetes manifests for deploying various self-hosted services to the netflux.io domain.

Me deploying my blog on Kubernetes. Credit @dexhorthy

All of the manifests are built using Kustomize. I avoid Helm charts whenever possible, but when they're needed (Prometheus, Grafana, etc) the charts are inflated into this repository for visibility and auditability.

The manifests are deployed to a DigitalOcean managed k8s cluster in production, and can be easily applied to a local cluster for testing and development.

Of course all this would in many ways be simpler with a docker-compose.yml shipped to a virtual host, which is exactly how everything used to be deployed. This project is mostly a fun learning exercise.

Git

The main git repo is hosted at: https://git.netflux.io/rob/netflux-kubernetes

It is also mirrored on GitHub: https://github.com/rfwatson/netflux-kubernetes

Building

The manifests can be built with:

make dev

and applied with:

make dev | kubectl apply -f -

Linting

The manifests are linted with kube-linter:

kube-linter lint .

Helm charts

When required, Helm charts can be inflated with:

# install or update the prometheus helm chart:
make inflate name=prometheus chart=prometheus-community/prometheus

An optional values file can be provided, e.g. deploy/base/values/prometheus.yaml.

URLs

URLs to some of the deployed services:

Cluster setup

Development

To initialize the local PostgreSQL database:

# Ensure PostgreSQL helm chart is installed (only used in development env):
cd deploy
make dev | k apply -l app.kubernetes.io/name=postgresql -f -

kubectl port-forward dev-postgresql-0 5432
psql -h localhost -f ../kind/bin/setup-dev-db.sql

To connect locally to the Nginx ingress controller:

sudo -E kubectl port-forward dev-ingress-nginx-controller-abcdef1234-ab123 80:80 443:443 22:22

Additional dependencies