OKR/dev-upgrade/mysql/mysql-local-release.yaml

55 lines
1022 B
YAML

apiVersion: v1
kind: ReplicationController
metadata:
name: mysql
namespace: release
labels:
name: mysql
spec:
replicas: 1
selector:
name: mysql
template:
metadata:
labels:
name: mysql
spec:
containers:
- name: mysql
image: mysql:8.0.33
ports:
- containerPort: 3306
volumeMounts:
- name: mysql-data-release
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "----------"
- name: MYSQL_DATABASE
value: "devops"
- name: MYSQL_USER
value: "devops"
- name: MYSQL_PASSWORD
value: "devops"
volumes:
- name: mysql-data-release
hostPath:
path: /data/release/mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: release
labels:
name: mysql
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
nodePort: 30026
selector:
name: mysql
type: NodePort