63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
---
|
|
# configMap
|
|
# set global max_connections = 5000
|
|
# set global wait_timeout = 600
|
|
---
|
|
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
|
|
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max_connections=2000 --binlog_expire_logs_seconds=432000
|
|
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 |