You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
875 B
47 lines
875 B
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: database
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: database
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: database
|
|
spec:
|
|
containers:
|
|
- name: database
|
|
image: daocloud.io/library/mysql:5.7
|
|
env:
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
value: "123456"
|
|
- name: MYSQL_DATABASE
|
|
value: "ry"
|
|
volumeMounts:
|
|
- mountPath: /docker-entrypoint-initdb.d
|
|
name: ruoyi-data
|
|
resources:
|
|
limits:
|
|
memory: "500Mi"
|
|
cpu: "500m"
|
|
ports:
|
|
- containerPort: 3306
|
|
volumes:
|
|
- name: ruoyi-data
|
|
configMap:
|
|
name: ruoyi-init-data
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ruoyi-db
|
|
spec:
|
|
selector:
|
|
app: database
|
|
ports:
|
|
- port: 3306
|
|
targetPort: 3306
|
|
|
|
|