apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: xxl-job-admin
name: xxl-job-admin
namespace: ccetest #根据情况修改namespace
spec:
replicas: 3 #根据情况修改副本数
selector:
matchLabels:
app: xxl-job-admin
strategy: {}
template:
metadata:
labels:
app: xxl-job-admin
spec:
imagePullSecrets:
- name: default-secret #镜像拉取秘钥
containers:
- image: swr.cn-south-1.myhuaweicloud.com/vat-cicd-dfsk-test/atp-xxljob-service:2.3.1 #根据情况修改镜像名称
imagePullPolicy: Always
name: xxl-job-admin
ports:
- containerPort: 8080
env:
- name: PARAMS
value: "--spring.datasource.url=jdbc:mysql://172.151.2.89:3306/dfsk_atp_xxljob?Unicode=true&characterEncoding=UTF-8&useSSL=false --spring.datasource.username=dfsk_atp_xxljob --spring.datasource.password=31$G84RNt#@g"
---
apiVersion: v1
kind: Service
metadata:
name: xxl-job-admin
namespace: ccetest #根据情况修改namespace
labels:
app: xxl-job-admin
spec:
ports:
- port: 8080
targetPort: 8080
protocol: TCP
name: http
nodePort: 30081
type: NodePort
selector:
app: xxl-job-admin