mysql: Add k8s first example

This commit is contained in:
Florian RICHER 2025-03-26 17:18:17 +01:00
parent a1fbe3c1aa
commit 2a7051ab3b
7 changed files with 143 additions and 0 deletions

View file

@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql-phpmyadmin-deployment
labels:
app: mysql-phpmyadmin
spec:
replicas: 2
selector:
matchLabels:
app: mysql-phpmyadmin
template:
metadata:
labels:
app: mysql-phpmyadmin
spec:
containers:
- name: phpmyadmin
image: phpmyadmin:5.2
resources:
limits:
memory: "256Mi"
cpu: "1000m"
ports:
- containerPort: 80
env:
- name: PMA_HOST
valueFrom:
configMapKeyRef:
name: mysql-configmap
key: mysql-server
- name: PMA_USER
value: root
- name: PMA_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-secret
key: mysql-root-password