Run MSSQL with the Operator
This quickstart deploys a standalone SQL Server instance directly with the
MSSQL Operator — no platform required, just
Kubernetes and kubectl.
Prerequisites
- A Kubernetes cluster (v1.27+) and
kubectl - Helm v3.8+
- cert-manager
1. Install the operator
info
The MSSQL Operator is not publicly available — you need Solanica registry credentials to pull the chart and image. See Installation → Authenticate for the full steps, or contact us to request access.
Log in and create an image pull Secret with the credentials Solanica provided:
helm registry login ghcr.io --username <your-username> --password <your-access-token>
kubectl create namespace mssql-operator-system
kubectl create secret docker-registry solanica-registry \
--docker-server=ghcr.io \
--docker-username=<your-username> \
--docker-password=<your-access-token> \
--namespace mssql-operator-system
Then install the operator:
helm install mssql-operator \
oci://ghcr.io/solanicaio/charts/mssql-operator \
--version 0.1.9 \
--namespace mssql-operator-system --create-namespace \
--set manager.imagePullSecrets[0].name=solanica-registry
Verify the controller and CRDs:
kubectl get pods -n mssql-operator-system
kubectl get crds | grep mssql.solanica.io
2. Create the SA password Secret
kubectl create secret generic my-mssql-secret \
--from-literal=MSSQL_SA_PASSWORD='YourStrong@Passw0rd'
SQL Server enforces a strong password policy (8+ characters with upper, lower, digit, and symbol).
3. Create an instance
Save the following as instance.yaml:
apiVersion: mssql.solanica.io/v1alpha1
kind: MSSQLInstance
metadata:
name: my-mssql
spec:
size: 1
acceptEULA: true
saPasswordSecret: my-mssql-secret
storage:
size: 8Gi
Apply it and watch it come up:
kubectl apply -f instance.yaml
kubectl get mssqlinstances -w
# NAME SIZE READY STATUS AGE
# my-mssql 1 0 initializing 5s
# my-mssql 1 1 ready 45s
4. Connect
SA_PASSWORD=$(kubectl get secret my-mssql-secret -o jsonpath='{.data.MSSQL_SA_PASSWORD}' | base64 -d)
kubectl port-forward pod/my-mssql-0 1433:1433
sqlcmd -S "tcp:localhost,1433" -U sa -P "$SA_PASSWORD" -C -Q "SELECT @@VERSION"
See Connecting for more options.
Next steps
- Custom Resources — the API model.
- Availability Groups — add high availability.
- Backups & Restores — S3 backups and PITR.