apiVersion: v1
kind: Namespace
metadata:
name: typecho
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zhizhi-work-deployment
namespace: typecho
labels:
app: zhizhi-work
spec:
replicas: 1
selector:
matchLabels:
app: zhizhi-work
template:
metadata:
labels:
app: zhizhi-work
spec:
containers:
- name: zhizhi-work
image: nginx:latest
ports:
- containerPort: 80
volumeMounts:
- name: html-volume
mountPath: /usr/share/nginx/html
volumes:
- name: html-volume
hostPath:
path: /data/web/loveWork/html
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: zhizhi-work-service
namespace: typecho
labels:
app: zhizhi-work
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
selector:
app: zhizhi-work
最后修改:2025 年 03 月 09 日
© 允许规范转载