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