update: mysql

main
ycz008 2023-08-18 14:53:00 +08:00
parent e60753f608
commit bc6a415498
1 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,6 @@ apiVersion: v1
kind: ReplicationController kind: ReplicationController
metadata: metadata:
name: mysql name: mysql
namespace: dev
labels: labels:
name: mysql name: mysql
spec: spec:
@ -20,7 +19,7 @@ spec:
ports: ports:
- containerPort: 3306 - containerPort: 3306
volumeMounts: volumeMounts:
- name: mysql-data-dev - name: mysql-data-prod
mountPath: /var/lib/mysql mountPath: /var/lib/mysql
env: env:
- name: MYSQL_ROOT_PASSWORD - name: MYSQL_ROOT_PASSWORD
@ -32,15 +31,14 @@ spec:
- name: MYSQL_PASSWORD - name: MYSQL_PASSWORD
value: "Devops@2099" value: "Devops@2099"
volumes: volumes:
- name: mysql-data-dev - name: mysql-data-prod
hostPath: hostPath:
path: /data/dev/mysql path: /data/prod/mysql
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: mysql name: mysql
namespace: dev
labels: labels:
name: mysql name: mysql
spec: spec: