Homer is a fast and simple static HTML Dashboard by Bastien Wirtz that you can use as a landing page to access your web applications.

Homer Github: https://github.com/bastienwirtz/homer

While homer can be deployed using a helm chart, I wanted to deploy the app using config files in my home lab.

To quickly deploy homer:

  1. Create a namespace:
# ns.yml
apiVersion: v1
kind: Namespace
metadata:
  name: homer
  1. Create the Persistent Volume. I use NAS for storage and store all my kubernetes data on /volume1/k8s/
# pv.yml
metadata:
  name: pv-homer
  namespace: homer
spec:
  storageClassName: "nfs-csi" # Storage class for nfs storage.
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    server: storage.home
    path: /volume1/k8s/homer
    readOnly: false
  1. Create the Persistent Volume Claim for the homer App.
# pvc.yml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-homer
  namespace: homer
spec:
  storageClassName: nfs-csi
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  volumeName: pv-homer
  volumeMode: Filesystem
  1. Deploy the homer app. The app is exposed on Port 8080
# app.yml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: homer
  namespace: homer
  labels:
    app: homer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: homer
  template:
    metadata:
      labels:
        app: homer
    spec:
      volumes:
      - name: nfs-homer
        persistentVolumeClaim:
          claimName: pvc-homer
      containers:
      - image: b4bz/homer:latest
        name: homer
        imagePullPolicy: Always
        ports:
         - containerPort: 8080
           name: http-8080
           protocol: TCP
        volumeMounts:
         - mountPath: /www/assets
           name: nfs-homer 
           subPath: assets
  1. Create the service.
# svc.yml
apiVersion: v1
kind: Service
metadata:
  name: homer-service 
  namespace: homer
spec:
  selector:
    app: homer     
  ports:
    - name: http-80
      protocol: TCP
      port: 80
      targetPort: 8080
  1. Create the ingress to expose the application to your home network.
# ingress.yml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: homer-ingress
  namespace: homer
spec:
  rules:
  - host: start.home
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: homer-service
            port: 
              number: 80

Configuration to create the NFS storage class if need be:

# sc.yml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
  server: storage.home
  share: /volume1/k8s
reclaimPolicy: Retain
volumeBindingMode: Immediate