forked from sfrechette/sqlserver-gke-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlserver-deploy.yaml
50 lines (49 loc) · 1.06 KB
/
sqlserver-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# sqlserver deployment and service: sqlserver-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sqlserver-deployment
spec:
replicas: 1
selector:
matchLabels:
app: ms-sqlserver
template:
metadata:
labels:
app: ms-sqlserver
spec:
terminationGracePeriodSeconds: 10
containers:
- name: ms-sqlserver
image: mcr.microsoft.com/mssql/server:2017-latest
ports:
- containerPort: 1433
env:
- name: ACCEPT_EULA
value: "Y"
- name: SA_PASSWORD
valueFrom:
secretKeyRef:
name: sqlserver-secret
key: SA_PASSWORD
volumeMounts:
- name: sqlserver-volume
mountPath: /var/opt/mssql
volumes:
- name: sqlserver-volume
persistentVolumeClaim:
claimName: sqlserver-volume
---
apiVersion: v1
kind: Service
metadata:
name: sqlserver-deployment
spec:
selector:
app: ms-sqlserver
ports:
- protocol: TCP
port: 1433
targetPort: 1433
type: LoadBalancer