apiVersion: apps/v1
kind: Deployment
metadata:
  name: mssql
spec:
  selector:
    matchLabels:
      app: mssql
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  replicas: 1
  template:
    metadata:
      labels:
        app: mssql
    spec:
      containers:
      - name: mssql
        image: microsoft/mssql-server-linux
        imagePullPolicy: "IfNotPresent"
        ports:
        - containerPort: 1433
        env:
        - name: ACCEPT_EULA
          value: "Y"
        - name: SA_PASSWORD
          value:  "P@ssw0rd"
        volumeMounts:
        - mountPath: /var/opt/mssql
          name: mssqldb
      volumes:
      - name: mssqldb
        persistentVolumeClaim:
          claimName: mssql-data
