I have tried following the instructions on this webpage: https://dbafromthecold.com/2019/02/20/creating-custom-sql-server-helm-charts/ i.e.
1) helm init 2) mkdir C:\Helm 3) cd C:\Helm 4) helm create testsqlchart 5) cd testsqlchart/templates 6) rm deployment.yaml rm service.yaml rm ingress.yaml
7) Re-create deployment.yaml: –
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: sqlserver
spec:
replicas: 1
template:
metadata:
labels:
name: sqlserver
spec:
containers:
- name: sqlserver1
image: mcr.microsoft.com/mssql/server:2019-CTP2.2-ubuntu
ports:
- containerPort: 1433
env:
- name: SA_PASSWORD
value: "Testing1122"
- name: ACCEPT_EULA
value: "Y"
8) Re-create service.yaml file:
apiVersion: v1
kind: Service
metadata:
name: sqlserver-service
spec:
ports:
- name: sqlserver
port: 1433
targetPort: 1433
selector:
name: sqlserver
type: LoadBalancer
9) cd C:\Helm
10) helm install ./testsqlchart --name testsqlserver
11) kubectl get pods
Why is the Pod in a state of error? Here is the result of: kubectl describe pod sqlserver-68865dd9f8-7xrtp
Name: sqlserver-68865dd9f8-7xrtp
Namespace: default
Priority: 0
Node: docker-desktop/192.168.65.3
Start Time: Fri, 10 Apr 2020 10:22:24 +0100
Labels: name=sqlserver
pod-template-hash=68865dd9f8
Annotations: <none>
Status: Running
IP: 10.1.1.11
Controlled By: ReplicaSet/sqlserver-68865dd9f8
Containers:
sqlserver1:
Container ID: docker://ac6c42c381a8368d7e354ab385181a2d94754ebefddf9fb5412f232a2c8539e6
Image: mcr.microsoft.com/mssql/server:2019-CTP2.2-ubuntu
Image ID: docker-pullable://mcr.microsoft.com/mssql/server@sha256:5beefc726eab1546a05a6520cdea9a795e7f64287821393f29099b6c21379419
Port: 1433/TCP
Host Port: 0/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 139
Started: Fri, 10 Apr 2020 10:28:12 +0100
Finished: Fri, 10 Apr 2020 10:28:13 +0100
Ready: False
Restart Count: 6
Environment:
SA_PASSWORD: Testing1122
ACCEPT_EULA: Y
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-bncbh (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
default-token-bncbh:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-bncbh
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 8m2s default-scheduler Successfully assigned default/sqlserver-68865dd9f8-7xrtp to docker-desktop
Normal Pulled 6m30s (x5 over 8m1s) kubelet, docker-desktop Container image "mcr.microsoft.com/mssql/server:2019-CTP2.2-ubuntu" already present on machine
Normal Created 6m30s (x5 over 8m1s) kubelet, docker-desktop Created container sqlserver1
Normal Started 6m30s (x5 over 8m1s) kubelet, docker-desktop Started container sqlserver1
Warning BackOff 2m50s (x26 over 7m56s) kubelet, docker-desktop Back-off restarting failed container
and the result of: kubectl log sqlserver-68865dd9f8-7xrtp
log is DEPRECATED and will be removed in a future version. Use logs instead.
Error: The evaluation period has expired.
This program has encountered a fatal error and cannot continue running at Fri Apr 10 09:28:13 2020
The following diagnostic information is available:
Reason: 0x00000003
Message: Unexpected call to legacy ABI.
Stacktrace: 00005624f716fab4 00005624f716f645 00005624f70b2cbe
00005624f70f6b17
Process: 1 - sqlservr
Thread: 6
Instance Id: e667ce1e-2281-4bf1-a82c-5ee7f67cef46
Crash Id:
Build stamp: 05d4bbaeb108ea432efd44222e380bef8c0a58f369e177ebabf61c807e4b3893
Timestamp: Fri Apr 10 09:28:13 2020
Notice the Error: The evaluation period has expired. I have noticed that if I go into: deployment.yaml and change the image line to:
image: microsoft/mssql-server-linux
then it works i.e. I can connect via SQL Studio Manager.
After couple tries I see that there is a same problem with all 2019-CTP-*
images.
"2019-CTP2.0",
"2019-CTP2.0-ubuntu",
"2019-CTP2.1",
"2019-CTP2.1-ubuntu",
"2019-CTP2.2",
"2019-CTP2.2-ubuntu",
"2019-CTP2.3",
"2019-CTP2.3-ubuntu",
"2019-CTP2.4",
"2019-CTP2.4-ubuntu",
"2019-CTP2.5",
"2019-CTP2.5-ubuntu",
"2019-CTP3.0",
"2019-CTP3.0-ubuntu",
"2019-CTP3.1",
"2019-CTP3.1-ubuntu",
"2019-CTP3.2",
"2019-CTP3.2-ubuntu",
NO issues at all with Featured 2019-CU4-ubuntu-16.04
version.
Suggest you use different from CTP
version
$ kubectl get pods | grep sql
sqlserver-55c86b7c8b-2wrb7 1/1 Running 0 5m58s
User contributions licensed under CC BY-SA 3.0