Skip to content

Uptime Kuma

Uptime Kuma A awesome self-hosted monitoring tool.

Apply the manifest.

cat uptime-kuma.yml | envsubst | kubectl apply -f -
uptime-kuma.yml
kind: Namespace
apiVersion: v1
metadata:
  name: kuma
---
apiVersion: v1
kind: Service
metadata:
  name: uptime-kuma-service
  namespace: kuma
spec:
  selector:
    app: uptime-kuma
  ports:
  - name: uptime-kuma
    port: 3001
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: uptime-kuma
  namespace: kuma
spec:
  replicas: 1
  serviceName: uptime-kuma-service
  selector:
    matchLabels:
      app: uptime-kuma
  template:
    metadata:
      labels:
        app: uptime-kuma
    spec:
      containers:
        - name: uptime-kuma
          image: louislam/uptime-kuma:1.23.7
          env:
            - name: UPTIME_KUMA_PORT
              value: "3001"
            - name: PORT
              value: "3001"
          ports:
            - name: uptime-kuma
              containerPort: 3001
              protocol: TCP
          volumeMounts:
            - name: kuma-data
              mountPath: /app/data

  volumeClaimTemplates:
    - metadata:
        name: kuma-data
      spec:
         accessModes:
           - ReadWriteOnce
        volumeMode: Filesystem
        resources:
          requests:
            storage: 1Gi
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kuma
  namespace: kuma
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
  ingressClassName: traefik
  tls:
  - hosts:
    - uptime.${DOMAIN}
    secretName: uptime.${DOMAIN}
  rules:
  - host: uptime.${DOMAIN}
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: uptime-kuma-service
            port:
              number: 3001

This example uses ingress with port 3001 and is redirected to https://uptime.${DOMAIN} it will get its cert from letsencrypt-prod.

This does have a persistent volume of 1gb

More info found here https://github.com/louislam/uptime-kuma