Manifesto
kind: Namespace
apiVersion: v1
metadata:
name: monitoring
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: uptime-kuma-pvc
namespace: monitoring
spec:
accessModes:
- ReadWriteOnce
storageClassName: standard-rwo
resources:
requests:
storage: 1G
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: uptime-kuma-deployment
namespace: monitoring
spec:
selector:
matchLabels:
app: uptime-kuma
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
template:
metadata:
labels:
app: uptime-kuma
spec:
containers:
- name: uptime-kuma
image: louislam/uptime-kuma:1.23.16
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3001
name: web-ui
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 50m
memory: 128Mi
livenessProbe:
tcpSocket:
port: web-ui
initialDelaySeconds: 60
periodSeconds: 10
readinessProbe:
httpGet:
scheme: HTTP
path: /
port: web-ui
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
- name: data
mountPath: /app/data
volumes:
- name: data
persistentVolumeClaim:
claimName: uptime-kuma-pvc
---
apiVersion: v1
kind: Service
metadata:
name: uptime-kuma-svc
namespace: monitoring
spec:
selector:
app: uptime-kuma
ports:
- name: uptime-kuma
port: 3001
targetPort: 3001
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: uptime-kuma-ingress
namespace: monitoring
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
tls:
- hosts:
- status.dominio.tld
secretName: status-dominio-tld.pem
rules:
- host: status.dominio.tld
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: uptime-kuma-svc
port:
number: 3001