OKR/trainer-upgrade/mysql/mysql-drill.yaml

57 lines
1.2 KiB
YAML
Raw Normal View History

2023-06-01 19:28:28 +08:00
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql-drill
namespace: basic
labels:
name: mysql-drill
spec:
replicas: 1
selector:
name: mysql-drill
template:
metadata:
labels:
name: mysql-drill
spec:
containers:
- name: mysql-drill
image: mysql:8.0.33
ports:
- containerPort: 3306
volumeMounts:
- name: data-drill
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "Beaconfire@2099"
volumes:
- name: data-drill
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: mysql-drill
namespace: basic
labels:
name: mysql-drill
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
nodePort: 30017
selector:
name: mysql-drill
type: NodePort