jcce-market/jcce-market.yaml

58 lines
1.2 KiB
YAML
Raw Normal View History

2023-07-31 17:32:24 +08:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: jcce-market-deployment
namespace: jcce-system
labels:
k8s-app: jcce-market
spec:
replicas: 1
selector:
matchLabels:
k8s-app: jcce-market
template:
metadata:
labels:
k8s-app: jcce-market
spec:
imagePullSecrets:
- name: secret_name
containers:
- name: jcce-market
# 指定Docker Hub中的镜像地址
image: image_name
ports:
- containerPort: 8015
env:
# 指定环境
- name: spring.profiles.active
value: test
# 指定时区
- name: TZ
value: Asia/Shanghai
volumeMounts:
- mountPath: /var/logs
name: log-volume
restartPolicy: Always
volumes:
- name: log-volume
hostPath:
path: /data/app/jcce-market/logs
type: DirectoryOrCreate
---
apiVersion: v1
kind: Service
metadata:
name: jcce-market-service
namespace: jcce-system
spec:
type: ClusterIP
selector:
k8s-app: jcce-market
ports:
- name: http
protocol: TCP
port: 8015
targetPort: 8015