add sepreated

main
ycz008 2023-05-30 12:05:04 +08:00
parent 5918c0627d
commit aff89038e1
15 changed files with 118 additions and 0 deletions

View File

@ -0,0 +1,59 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: axon-mysql
namespace: basic
labels:
name: axon-mysql
spec:
replicas: 1
selector:
name: axon-mysql
template:
metadata:
labels:
name: axon-mysql
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: In
values:
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
containers:
- name: axon-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: "event_store"
volumes:
- name: mysql-data-staff-axon
hostPath:
path: /data/staff-axon/mysql
---
apiVersion: v1
kind: Service
metadata:
name: axon-mysql
namespace: basic
labels:
name: axon-mysql
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
nodePort: 30016
selector:
name: axon-mysql
type: NodePort

View File

@ -0,0 +1,59 @@
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:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: In
values:
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
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
---
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