59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
name: drill-mysql
|
|
namespace: basic
|
|
labels:
|
|
name: drill-mysql
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
name: drill-mysql
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: drill-mysql
|
|
spec:
|
|
containers:
|
|
- name: drill-mysql
|
|
image: mysql:8.0.33
|
|
ports:
|
|
- containerPort: 3306
|
|
volumeMounts:
|
|
- name: mysql-data-staff-axon
|
|
mountPath: /var/lib/mysql
|
|
env:
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
value: "Beaconfire@2099"
|
|
- name: MYSQL_DATABASE
|
|
value: "drill"
|
|
volumes:
|
|
- name: mysql-data-staff-axon
|
|
hostPath:
|
|
path: /data/staff-axon/mysql
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: "kubernetes.io/hostname"
|
|
operator: In
|
|
values:
|
|
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: drill-mysql
|
|
namespace: basic
|
|
labels:
|
|
name: drill-mysql
|
|
spec:
|
|
ports:
|
|
- protocol: TCP
|
|
port: 3306
|
|
targetPort: 3306
|
|
nodePort: 30017
|
|
selector:
|
|
name: drill-mysql
|
|
type: NodePort |