Minimal Kubernetes applications
Minimal Kubernetes applications for the homelabber
Kubernetes provides a standardised api which with the primitives needed to deploy run container software. Having worked in SilverStripe platform team who were responsible for a proprietary deployment and orchestration software I have been following the progress around kubernetes for a long time. It would appear to provide a ready made solution for the operation and deployment of software.
first deployment
there are significant challenges implementing a kubernetes deployment
- Drivers
kubernetes provides out of the box tools for managing processing workloads (called pods) however when deploying on bare metal an administrator has to provide their own storage and networking software through the use of kubernetes api operators (or drivers)
- learning curve
kubernetes is an abstraction layer overtop of linux and container runtimes learning linux and container runtimes first is essential to even beginning to understand how to run software in pods after that hurdle is passed now the would-be administrator is faced with an onslaught of terminology and software plugins which can intimidate and put you off starting.
my entrance point to kubernetes was k3s
the quickstart guide is very simple
it comes with klipper and local-storage which provide the minimum workload (pod) requirements for networking and storage.
My current setup uses
- https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner nfs for host independent storage
- https://metallb.io/ metal lb for load balancer addresses
application managment
my experience with a small homelab cluster was that helm deployments advertised what i wanted but prevented me from learning how to write my own deployments. I would often deploy via helm and have the application spew logs that I had done it wrong with just the defaults
it’s not a great administrator experience
kompose
often self hosted applications come with docker-compose yaml configrations
kompose is able to translate those (somewhat poorly) into kubernetes yaml
With the heavy lifting done from there I can shuffle around the components into an application folder and deploy with kubectl apply -f example-application/
Once I have a working application I can then add networking service definitions and link to the bastion reverse proxy host in catalyst cloud.
adding a pull policy for updates means no worries about patching