apiVersion: apps/v1
kind: Deployment
metadata:
  name: sqlserver
spec:
  selector:
    matchLabels:
      app: sqlserver
  replicas: 1
  template:
    metadata:
      labels:
        app: sqlserver
    spec:
      containers:
      - name: sqlserver
        image: mcr.microsoft.com/mssql/server
        ports:
        - containerPort: 1433
        env:
        - name: MSSQL_PID
          value: "Developer"
        - name: ACCEPT_EULA
          value: "Y"
        - name: SA_PASSWORD
          value: yourStrong(!)Password
        - name: MSSQL_SA_PASSWORD
          value: yourStrong(!)Password
        volumeMounts:
        - name: dbdata
          mountPath: /var/opt/mssql
      volumes:
      - name: dbdata
        persistentVolumeClaim:
          claimName: dbdata