firefly-iii/.deploy/kubernetes/sql.yaml
2018-03-11 18:27:30 +01:00

50 lines
797 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: sql-pass
type: Opaque
data:
password: cGFzc3dvcmQ=
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: mysql
namespace: firefly
labels:
app: mysql
spec:
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- image: mysql
imagePullPolicy: IfNotPresent
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: sql-pass
key: password
ports:
- containerPort: 3306
name: mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
ports:
- port: 3306
type: NodePort
selector:
app: mysql