You've already forked DataMate
init datamate
This commit is contained in:
61
deployment/kubernetes/mysql/deploy.yaml
Normal file
61
deployment/kubernetes/mysql/deploy.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mysql
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql:8
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "Huawei@123"
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: data-volume
|
||||
mountPath: /var/lib/mysql
|
||||
- name: init-sql
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
- name: mysql-utf8-config
|
||||
mountPath: /etc/mysql/conf.d
|
||||
volumes:
|
||||
- name: data-volume
|
||||
hostPath:
|
||||
path: /opt/data-mate/data/mysql
|
||||
type: DirectoryOrCreate
|
||||
- name: init-sql
|
||||
configMap:
|
||||
name: init-sql
|
||||
- name: mysql-utf8-config
|
||||
configMap:
|
||||
name: mysql-utf8-config
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: mysql
|
||||
Reference in New Issue
Block a user