1.我是选择k8s 部署的yaml如下:(存储根据情况自定义)
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
component: uptime-kuma
name: uptime-kuma
namespace: pro
spec:
selector:
matchLabels:
component: uptime-kuma
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
component: uptime-kuma
spec:
containers:
- name: app
image: louislam/uptime-kuma:1
ports:
- containerPort: 3001
volumeMounts:
- mountPath: /app/data
name: storage
- mountPath: /etc/localtime
name: time
# livenessProbe:
# exec:
# command:
# - node
# - extra/healthcheck.js
# initialDelaySeconds: 180
# periodSeconds: 60
# timeoutSeconds: 30
# readinessProbe:
# httpGet:
# path: /
# port: 3001
# scheme: HTTP
volumes:
- name: storage
hostPath:
path: /data-metting/uptime-kuma
- name: time
hostPath:
path: /etc/localtime
apiVersion: v1
kind: Service
metadata:
name: uptime-kuma
namespace: pro
spec:
selector:
component: uptime-kuma
type: NodePort
ports:
- name: http
port: 3001
targetPort: 3001
nodePort: 3001
protocol: TCP
访问如下:http://ip:3001
我是使用的飞书机器人,具体根据自己的需求来
2.监控接口:
备注: 参考连接: https://mp.weixin.qq.com/s/c5fLZt7mYTWUII1nVdK-1w 官网: https://uptime.kuma.pet/docs/%F0%9F%94%A7-How-to-Install k8s部署: https://github.com/louislam/uptime-kuma/tree/k8s-unofficial/kubernetes