testkube
testkube copied to clipboard
testkube-dashboard pod remains in Error and keep going into CrashLoopBackoff after installation
Describe the bug testkube-dashboard pod remains in Error and keep going into CrashLoopBackoff after installation
To Reproduce Steps to reproduce the behavior:
- Install testkube client successfully
- Install helm using snap
- Install testkube on the cluster
kubectl testkube install
- oc get all -n testkube
Expected behavior All the pods including the dashboard should be in running state.
Actual Behaviour
$ oc get pods -n testkube NAME READY STATUS RESTARTS AGE jetstack-cert-manager-b9ff49fc6-88gkd 1/1 Running 0 30m jetstack-cert-manager-cainjector-7f487f7b7c-jp2pl 1/1 Running 0 30m jetstack-cert-manager-webhook-5957668b46-sc56b 1/1 Running 0 30m testkube-api-server-79774bcd79-4gk9j 1/1 Running 0 10m testkube-dashboard-75dd4b7455-nh2xg 0/1 Error 1 (2s ago) 5s testkube-minio-testkube-64cd475b94-r25rp 1/1 Running 0 28m testkube-operator-controller-manager-66ff4cdfd4-pqjdt 2/2 Running 0 28m
Version / Cluster - Which testkube version? Client Version 1.2.37 Server Version v1.2.37 Commit c7c1f2032affdd4b6017e862a884e2ee6edeb3e1 Built by goreleaser Build date 2022-06-27T13:21:17Z
-
What Kubernetes cluster? (e.g. GKE, EKS, Openshift etc, local KinD, local Minikube) -> Openshift 4.9 on GCP
-
What Kubernetes version?
$ oc version Client Version: 4.8.3 Server Version: 4.9.0 Kubernetes Version: v1.22.8+f34b40c
Additional context
$ oc logs -n testkube testkube-dashboard-75dd4b7455-nh2xg /usr/share/nginx/html/env.sh: line 3: can't create ./env-config.js: Permission denied /usr/share/nginx/html/env.sh: line 4: can't create ./env-config.js: Permission denied /usr/share/nginx/html/env.sh: line 5: can't create ./env-config.js: Permission denied
Thank you @stillalearner for detailed report. Will check it out as quick as possible
Hey, @stillalearner We have an idea, that it might be something Openshift presmissions related. We'll try to install Testkube to Openshift and see what's going wrong
Hey I have worked out why this might not be working for you it will be due to security context constraint issues and the platform running as non root I have made a feature request here to allow testkube to run as non root https://github.com/kubeshop/testkube/issues/1810
as a workaround, you can add the testkube-dashboard, testkube-mongodb and to the privileged SecurityContextConstraint as well ad edit the deployment for the dashboard security context to run as user 0 again this is a work around the correct implementation would be for test-kube to run full as non-root
Also to note it would be a good idea to remove the ingress and create a route instead as that is the preferred way for Openshfit to connect to pods
Hello @stillalearner we've just released Testkube version which should work on root-less envs like OpenShift. I was able to install and run Testkube on clean openshift cluster. Please ping us if following instructions also works for you: https://kubeshop.github.io/testkube/installing#intallation-on-openshift
Closing this issue for now.