Files
DADProject/deployment/extra_examples/kubernetes-mysql.yml
2026-01-03 17:22:09 +00:00

46 lines
860 B
YAML

# mysql-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
namespace: dad-group-46
spec:
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
priorityClassName: high-priority
containers:
- name: mysql
image: mysql:8.0
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "yes"
- name: MYSQL_DATABASE
value: "project"
ports:
- containerPort: 3306
resources:
requests:
memory: "384Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: dad-group-46
spec:
ports:
- port: 3306
selector:
app: mysql