自己做的镜像
confingmap
apiVersion: v1
data:
bootstrap.properties: |-
DB_HOST=192.168.1.99
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=123456
DB_DATABASE=datax_web_db
kind: ConfigMap
metadata:
name: dataxweb-config
namespace: default
主体yaml
apiVersion: apps/v1
kind: Deployment
metadata:
template:
metadata:
spec:
containers:
- image: datax-web
imagePullPolicy: IfNotPresent
name: dataxweb
ports:
- containerPort: 9527
name: http
protocol: TCP
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities: {}
privileged: false
readOnlyRootFilesystem: false
runAsNonRoot: false
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
tty: true
volumeMounts:
- mountPath: /opt/local/datax-web-2.1.2/modules/datax-admin/conf/bootstrap.properties
name: dataxweb-config
readOnly: true
subPath: bootstrap.properties
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 511
name: dataxweb-config
optional: false
name: dataxweb-config