This commit is contained in:
2026-01-14 11:48:02 +08:00
parent 3df4a64cef
commit b8db9d50e9
5 changed files with 102 additions and 3 deletions

View File

@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: blog
labels:
app: blog
spec:
replicas: 1
selector:
matchLabels:
app: blog
template:
metadata:
labels:
app: blog
spec:
containers:
- name: blog
image: docker.cnb.cool/abearxiong/blog:latest
ports:
- containerPort: 80
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
---
apiVersion: v1
kind: Service
metadata:
name: blog
labels:
app: blog
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: blog
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: blog-https
spec:
entryPoints:
- websecure
routes:
- match: Host(`blog.xiongxiao.me`)
kind: Rule
services:
- name: blog
port: 80
tls:
certResolver: letsencrypt