mssql

by XROW GmbH

Helm chartv1.10.3App 2025-CU2-rhel-10Verified publisher

Microsoft SQL Server is a DBMS used by many organizations. Ease Migrating your SQL Servers to Cloud Native by leveraging this Helm chart.

About this chart

Helm chart for Microsoft SQL Server

Microsoft SQL Server is still used by many organizations. And migration to Cloud native can be a blocked by having this technology. In order to help organization to lift-shift to Cloud Native, they can run also MS SQL in kubernetes via this Helm chart

DISCLAIMER BY DEPLOYING THIS HELM CHART, YOU ARE ACCEPTING THE END-USER Licensing Agreement of Microsoft SQL Server

Install

Verify the helm chart via cosign

cosign verify registry.gitlab.com/xrow-public/helm-mssql/mssql:1.10.3 --certificate-identity "https://gitlab.com/xrow-public/helm-mssql//.gitlab-ci.yml@refs/heads/main" --certificate-oidc-issuer "https://gitlab.com"

values.yaml

---
global:
  storageClass: "managed-csi-premium" # Change this if needed

auth:
  database: test
  rootPassword: 'yourStrong(#)Password'
  username: test
  password: 'yourStrong(#)Password'
helm upgrade --install mssql oci://registry.gitlab.com/xrow-public/helm-mssql/charts/mssql --version 1.10.3 --create-namespace -n mssql -f values.yaml

values.yaml

Check default values of this chart here .

Features

  • Applying Helm Chart standards
  • Ability to specify own registry
  • Persisting data
  • Auto Bootstrapping Database
  • Auto Bootstraping Database Owner User with given password
  • Ability to execute initial DB scripts (SQL)
  • Replication architecture with separate primary and secondary StatefulSets and services
  • Performance Monitoring - Integrated with Prometheus Operator

Replication architecture

Set architecture: replication to deploy one primary StatefulSet and a configurable secondary StatefulSet.

architecture: replication

auth:
  rootPassword: 'yourStrong(#)Password'
  replicationPassword: 'yourStrong(#)Password'

secondary:
  replicaCount: 2

The chart renders independent persistent volumes for primary and secondary pods, headless services for stable StatefulSet DNS, and separate client services:

  • <release>-mssql-primary for primary connections
  • <release>-mssql-secondary for secondary connections

Data initalisation via init folder

FROM registry.gitlab.com/xrow-public/helm-mssql:1.10.3

COPY *.sql /docker-entrypoint-initdb.d

Test the container

podman build -t mssql .
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourStrong#Passw0rd>' -p 1433:1433 -v sqlvolume:/var/opt/mssql -it localhost/mssql:1.10.3

Credits

Credits to ElmCompany for inital work.

Schema

Generated from values.schema.json.

PathTypeDefaultAllowed valuesDescription
globalobjectGlobal values shared across chart resources.
global.imageRegistrystring""
global.imagePullSecretsarray[]
global.storageClassstring""
nameOverridestring""
fullnameOverridestring""
namespaceOverridestring""
clusterDomainstring"cluster.local"
commonAnnotationsobject
commonLabelsobject
imageobjectMSSQL server image settings.
image.registrystring"registry.gitlab.com"
image.repositorystring"xrow-public/helm-mssql/mssql"
image.tagstring"main"
image.pullPolicystring"IfNotPresent""Always", "IfNotPresent", "Never"
image.pullSecretsarray[]
image.debugbooleanfalse
architecturestring"standalone""standalone", "replication"
editionstring"Express""Developer", "Express", "Standard", "Enterprise", "EnterpriseCore"
authobjectMSSQL authentication and bootstrap database settings.
auth.rootPasswordstring""
auth.createDatabasebooleantrue
auth.databasestring"database"
auth.databaseCollatestring"Latin1_General_CI_AS"
auth.usernamestring""
auth.passwordstring""
auth.createLoginbooleantrue
auth.replicationUserstring"replicator"
auth.replicationPasswordstring""
auth.existingSecretstring""
primaryobjectPrimary MSSQL StatefulSet settings.
primary.namestring"primary"
primary.lifecycleHooksobject
primary.hostAliasesarray[]
primary.existingConfigmapstring""
primary.mssqlConfigstring"[EULA]\naccepteula = Y\naccepteulaml = Y\n\n[coredump]\ncaptureminiandfull = true\ncoredumptype = full\n\n[hadr]\nhadrenabled = 1\n\n[language]\nlcid = 1033\n\n[filelocation]\ndefaultdatadir = {{ .Values.primary.persistence.mount }}\ndefaultlogdir = /var/opt/mssql/log\n"
primary.tempdbobject
primary.tempdb.inMemoryobject
primary.tempdb.inMemory.enabledbooleanfalse
primary.tempdb.inMemory.mountPathstring"/var/opt/mssql/tempdb"
primary.tempdb.inMemory.sizeLimitstring"2Gi"
primary.updateStrategyobject
primary.updateStrategy.typestring"RollingUpdate""RollingUpdate", "OnDelete"
primary.podAnnotationsobject
primary.podAffinityPresetstring"""", "soft", "hard"
primary.podAntiAffinityPresetstring"soft""", "soft", "hard"
primary.nodeAffinityPresetobject
primary.nodeAffinityPreset.typestring"""", "soft", "hard"
primary.nodeAffinityPreset.keystring""
primary.nodeAffinityPreset.valuesarray[]
primary.affinityobject
primary.nodeSelectorobject
primary.nodeSelector.kubernetes.io/osstring"linux"
primary.tolerationsarray[]
primary.priorityClassNamestring""
primary.schedulerNamestring""
primary.terminationGracePeriodSecondsstring""
primary.topologySpreadConstraintsarray[]
primary.podManagementPolicystring""
primary.podSecurityContextobject
primary.podSecurityContext.enabledbooleantrue
primary.podSecurityContext.fsGroupinteger1001
primary.containerSecurityContextobject
primary.containerSecurityContext.enabledbooleantrue
primary.containerSecurityContext.runAsUserinteger1001
primary.containerSecurityContext.runAsNonRootbooleantrue
primary.resourcesobject
primary.resources.requestsobject
primary.resources.requests.memorystring"2G"
primary.resources.requests.cpustring"2000m"
primary.resources.limitsobject
primary.resources.limits.memorystring"4G"
primary.livenessProbeobject
primary.livenessProbe.enabledbooleantrue
primary.livenessProbe.initialDelaySecondsinteger5
primary.livenessProbe.periodSecondsinteger10
primary.livenessProbe.timeoutSecondsinteger1
primary.livenessProbe.failureThresholdinteger3
primary.livenessProbe.successThresholdinteger1
primary.readinessProbeobject
primary.readinessProbe.enabledbooleantrue
primary.readinessProbe.initialDelaySecondsinteger5
primary.readinessProbe.periodSecondsinteger10
primary.readinessProbe.timeoutSecondsinteger1
primary.readinessProbe.failureThresholdinteger3
primary.readinessProbe.successThresholdinteger1
primary.startupProbeobject
primary.startupProbe.enabledbooleantrue
primary.startupProbe.initialDelaySecondsinteger30
primary.startupProbe.periodSecondsinteger10
primary.startupProbe.timeoutSecondsinteger1
primary.startupProbe.failureThresholdinteger10
primary.startupProbe.successThresholdinteger1
primary.extraFlagsstring""
primary.extraEnvVarsarray[]
primary.extraEnvVarsCMstring""
primary.extraEnvVarsSecretstring""
primary.persistenceobject
primary.persistence.enabledbooleantrue
primary.persistence.mountstring"/var/opt/mssql"
primary.persistence.existingClaimstring""
primary.persistence.storageClassstring""
primary.persistence.annotationsobject
primary.persistence.accessModesarray["ReadWriteOnce"]
primary.persistence.sizestring"8Gi"
primary.persistence.selectorobject
primary.extraVolumesarray[]
primary.extraVolumeMountsarray[]
primary.initContainersarray[]
primary.sidecarsarray[]
primary.serviceobject
primary.service.typestring"ClusterIP""ClusterIP", "NodePort", "LoadBalancer", "ExternalName"
primary.service.portsobject
primary.service.ports.mssqlinteger1433
primary.service.nodePortsobject
primary.service.nodePorts.mssqlstring""
primary.service.clusterIPstring""
primary.service.loadBalancerIPstring""
primary.service.externalTrafficPolicystring"Cluster""Cluster", "Local"
primary.service.loadBalancerSourceRangesarray[]
primary.service.extraPortsarray[]
primary.service.annotationsobject
primary.service.sessionAffinitystring"None""None", "ClientIP"
primary.service.sessionAffinityConfigobject
primary.pdbobject
primary.pdb.createbooleanfalse
primary.pdb.minAvailableinteger1
primary.pdb.maxUnavailablestring""
primary.podLabelsobject
secondaryobjectSecondary MSSQL StatefulSet settings used by the replication architecture.
secondary.namestring"secondary"
secondary.replicaCountinteger1
secondary.hostAliasesarray[]
secondary.commandarray[]
secondary.argsarray[]
secondary.lifecycleHooksobject
secondary.existingConfigmapstring""
secondary.mssqlConfigstring"[EULA]\naccepteula = Y\naccepteulaml = Y\n\n[coredump]\ncaptureminiandfull = true\ncoredumptype = full\n\n[hadr]\nhadrenabled = 1\n\n[language]\nlcid = 1033\n\n[filelocation]\ndefaultdatadir = {{ .Values.secondary.persistence.mount }}\ndefaultlogdir = /var/opt/mssql/log\n"
secondary.updateStrategyobject
secondary.updateStrategy.typestring"RollingUpdate""RollingUpdate", "OnDelete"
secondary.podAnnotationsobject
secondary.podAffinityPresetstring"""", "soft", "hard"
secondary.podAntiAffinityPresetstring"soft""", "soft", "hard"
secondary.nodeAffinityPresetobject
secondary.nodeAffinityPreset.typestring"""", "soft", "hard"
secondary.nodeAffinityPreset.keystring""
secondary.nodeAffinityPreset.valuesarray[]
secondary.affinityobject
secondary.nodeSelectorobject
secondary.nodeSelector.kubernetes.io/osstring"linux"
secondary.tolerationsarray[]
secondary.priorityClassNamestring""
secondary.schedulerNamestring""
secondary.terminationGracePeriodSecondsstring""
secondary.topologySpreadConstraintsarray[]
secondary.podManagementPolicystring""
secondary.podSecurityContextobject
secondary.podSecurityContext.enabledbooleantrue
secondary.podSecurityContext.fsGroupinteger1001
secondary.containerSecurityContextobject
secondary.containerSecurityContext.enabledbooleantrue
secondary.containerSecurityContext.runAsUserinteger1001
secondary.containerSecurityContext.runAsNonRootbooleantrue
secondary.resourcesobject
secondary.resources.limitsobject
secondary.resources.requestsobject
secondary.livenessProbeobject
secondary.livenessProbe.enabledbooleantrue
secondary.livenessProbe.initialDelaySecondsinteger5
secondary.livenessProbe.periodSecondsinteger10
secondary.livenessProbe.timeoutSecondsinteger1
secondary.livenessProbe.failureThresholdinteger3
secondary.livenessProbe.successThresholdinteger1
secondary.readinessProbeobject
secondary.readinessProbe.enabledbooleantrue
secondary.readinessProbe.initialDelaySecondsinteger5
secondary.readinessProbe.periodSecondsinteger10
secondary.readinessProbe.timeoutSecondsinteger1
secondary.readinessProbe.failureThresholdinteger3
secondary.readinessProbe.successThresholdinteger1
secondary.startupProbeobject
secondary.startupProbe.enabledbooleantrue
secondary.startupProbe.initialDelaySecondsinteger15
secondary.startupProbe.periodSecondsinteger10
secondary.startupProbe.timeoutSecondsinteger1
secondary.startupProbe.failureThresholdinteger15
secondary.startupProbe.successThresholdinteger1
secondary.customLivenessProbeobject
secondary.customReadinessProbeobject
secondary.cust

Deploy mssql with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mssql on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmssql is pinned at v1.10.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply