-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSSQL pod fail on crashloopBackOff #70
Comments
If i replace the default image I don't know why |
I have seen this caused by having DB files out there created from a previous install that is running under a different security context (i.e. a different service account) or issues with the storage class permissions. Which flavor of Kubernetes are you running? |
I am experiencing the same problem here. Running on Talos 1.6.1.
|
I think this charts has some missing init containers to set up correct rights on volume before starting main containers. I have the same error on all the pods about permission denied on each volumes |
In my case i was attaching a PVC for the data volume and was getting the same permission error. I can get the pod to start, but I know there must be a better way.
Then i edit securityContext:
fsGroup: 10001 Finally And here is just a sample from the file where the change needs to be made: ---
# Source: self-host/templates/mssql.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
...
spec:
serviceName: release-name-self-host-mssql
template:
spec:
securityContext:
fsGroup: 10001
containers:
- name: release-name-self-host-mssql
image: "mcr.microsoft.com/mssql/server:2022-CU11-ubuntu-22.04" |
I was also having this issue. I am using the k8s sigs nfs provisioner and I was able to get past this error by setting I also removed the old files so the pod could recreate them with the correct UID. #
# Configure database
#
database:
# deploy the database pod? if false, a connection string to a SQL Server will need to be provided through one of the configuration providers.
enabled: true
# Labels to add to the MSSQL deployment
labels: {}
# Image name, tag, and pull policy
image:
name: mcr.microsoft.com/mssql/server
# Tag of the image to use. (Defaults to general.coreVersion)
tag: 2022-CU11-ubuntu-22.04
# This will set the Kubernetes container security context
securityContext:
runAsUser: 10001
# Run the pod under a service account you create. This is especially useful for OpenShift deployments
podServiceAccount: |
For me, only as root user. But worked. securityContext: |
I have resolved this with a few changes to the mssql.yaml template. Hopefully this can be corrected in the official helm charts. First is to change the "startupProbe" command on the container to: This will ignore the cert error the command gets with -C as well as corrects the broken path to "mssql-tools18" Second is to correct permissions on the folder structure by adding an init container:
|
Steps To Reproduce
deploy minimal helm values:
Expected Result
mssql pod is up and running
Actual Result
mssql log:
kube event:
Screenshots or Videos
No response
Additional Context
No response
Chart Version
self-host-0.1.7-Beta
Environment Details
kubernetes self-hosted: 1.22.2
Issue Tracking Info
The text was updated successfully, but these errors were encountered: