mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-05-12 06:42:08 +08:00
更新K3S,docker-compose两种部署方式
This commit is contained in:
52
deploy/manifest-server/redis/deployment-service.yaml
Normal file
52
deploy/manifest-server/redis/deployment-service.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: redis
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: redis
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis:7.0.12
|
||||
name: redis
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: requirepass
|
||||
value: pandax
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: redis
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: redis-data
|
||||
mountPath: /data
|
||||
- name: mysql-log
|
||||
mountPath: /logs
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: ./redis/data
|
||||
name: redis-data
|
||||
- hostPath:
|
||||
path: ./redis/logs
|
||||
name: redis-log
|
||||
Reference in New Issue
Block a user