Describe the bug:
After running helm install, pods will not schedule due to global psp configuration which adds runAsNonRoot to the spec (see CIS 1.6 Self-Assessment Guide), or admission-control-config-file (CIS 1.23 Self-Assessment Guide).
Steps To Reproduce:
Installed RKE2.
Enable CIS 1.6 profile if on version <= 1.24.X, otherwise enable CIS 1.23 profile.
Install Longhorn (storage).
Install mongodb community operator.
Deploy mongodb instance and credentials as required by KRE.
Deploy KRE helm chart.
Expected behavior:
Pods will schedule on CIS hardened platform.
Actual behavior:
Pods will not schedule, helm install fails after timeout.
Additional context / logs:
Most events look like:
container has runAsNonRoot and image will run as root (pod: "kre-admin-api-7d499b76bf-d5gvs_kre(ae38ef4e-1841-4aa6-8187-40874b388941)", container: create-admin-api-files-directory)
or
container has runAsNonRoot and image has non-numeric user (kre), cannot verify user is non-root (pod: "kre-k8s-manager-865bdb4bf5-nc8jb_kre(fe9b5463-bac2-449f-8eb3-da80bcdc453e)", container: kre-k8s-manager)
Environmental Info: RKE2 Version:
rke2 version v1.24.12+rke2r1
Kubernetes version:
KRE Version: v8.2.0
Cluster Configuration: 1 Controller, 2 workers with CIS 1.6 profile enabled.
https://docs.rke2.io/security/hardening_guide
Describe the bug: After running helm install, pods will not schedule due to global psp configuration which adds runAsNonRoot to the spec (see CIS 1.6 Self-Assessment Guide), or admission-control-config-file (CIS 1.23 Self-Assessment Guide).
Steps To Reproduce:
Expected behavior: Pods will schedule on CIS hardened platform.
Actual behavior: Pods will not schedule, helm install fails after timeout.
Additional context / logs: Most events look like:
container has runAsNonRoot and image will run as root (pod: "kre-admin-api-7d499b76bf-d5gvs_kre(ae38ef4e-1841-4aa6-8187-40874b388941)", container: create-admin-api-files-directory)
or
container has runAsNonRoot and image has non-numeric user (kre), cannot verify user is non-root (pod: "kre-k8s-manager-865bdb4bf5-nc8jb_kre(fe9b5463-bac2-449f-8eb3-da80bcdc453e)", container: kre-k8s-manager)
All Deployment, Pod yaml attached as zip. kre.zip
Here's an abbreviated example of a pod spec:
Plus here is a copy of the global psp:
Let me know if you need anything else!