Home > Storage > PowerFlex > White Papers > Snapshots Container Storage Modules (CSM) for Dell PowerFlex > Deploying SQL server container
The following code extract shows a sample SQL server Container YAML file:
apiVersion: apps/v1 kind: Deployment metadata: name: source-mssql01 spec: replicas: 1 selector: matchLabels: app: mssql template: metadata: labels: ##Lables should be unique to avoid any overlaps between containers## app: s-mssql01 spec: terminationGracePeriodSeconds: 120 hostname: s-mssql01 nodeSelector: host: R27-Node01 containers: - name: s-mssql01 command: - /bin/bash - -c - cp /var/opt/config/mssql.conf /var/opt/mssql/mssql.conf && /opt/mssql/bin/sqlservr image: mcr.microsoft.com/mssql/rhel/server:2019-latest resources: limits: memory: 32Gi cpu: 16000m ports: - containerPort: 1433 env: - name: MSSQL_PID value: "Developer" - name: ACCEPT_EULA value: "Y" - name: SA_PASSWORD valueFrom: secretKeyRef: name: source-mssql key: MSSQL_SA_PASSWORD volumeMounts: - name: mssqldb mountPath: /var/opt/mssql/data - name: mssqllogs mountPath: /var/opt/mssqlogs/logs - name: mssql-config-volume mountPath: /var/opt/config - name: mssqltemp mountPath: /var/opt/mssqltemp/tempdb volumes: - name: mssqldb persistentVolumeClaim: claimName: s-mssql01-sqldata - name: mssqllogs persistentVolumeClaim: claimName: s-mssql01-logs - name: mssqltemp persistentVolumeClaim: claimName: s-mssql01-temp - name: mssql-config-volume configMap: name: source-mssql-config
--- apiVersion: v1 kind: Service metadata: name: s-mssql01 spec: selector: app: mssql ports: - protocol: TCP port: 1433 targetPort: 1433 nodePort: 30011 type: NodePort |