Files
local-k8s/kind/mysql.yaml
T
argoyle 73bb4b38c3 chore: update labels to use app.kubernetes.io/name format
Refactor Kubernetes resource labels for rabbitmq, mysql, and postgres 
to follow the standardized naming convention of 
app.kubernetes.io/name. This change enhances clarity and conformity 
across resources, improving maintainability and alignment with 
Kubernetes best practices.
2025-01-24 19:00:40 +01:00

61 lines
1.1 KiB
YAML

apiVersion: v1
kind: Secret
metadata:
name: mysql
stringData:
DB_HOST: mysql
DB_PORT: "3306"
DB_NAME: mysql
DB_USER: mysql
DB_PASSWORD: mysql
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
spec:
selector:
matchLabels:
app.kubernetes.io/name: mysql
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: mysql
spec:
containers:
- image: mysql:9.2.0@sha256:45f5ae20cfe1d6e6c43684dfffef17db1e1e8dc9bf7133ceaafb25c16b10f31b
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: password
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: data
mountPath: /var/lib/mysql
volumes:
- name: data
hostPath:
path: /data/mysql
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: mysql
name: mysql
spec:
ports:
- name: mysql
port: 3306
nodePort: 3306
protocol: TCP
selector:
app.kubernetes.io/name: mysql
sessionAffinity: None
type: NodePort