We defined securityContext for containers in our deployments, but Kubeaudit still returns an error 'CapabilityOrSecurityContextMissing. Message: Security Context not set'.
ENVIRONMENT
Kubeaudit version: 0.22.0
Kubeaudit install method: Binary
STEPS TO REPRODUCE
Run kubeaudit all
EXPECTED RESULTS
Not having error 'CapabilityOrSecurityContextMissing. Message: Security Context not set'.
ACTUAL RESULTS
[error] CapabilityOrSecurityContextMissing
Message: Security Context not set. The Security Context should be specified and all Capabilities should be dropped by setting the Drop list to ALL.
ADDITIONAL INFORMATION
To debug the problem we also tried to output both pod and deployment as a yaml and run Kubeaudit on that, but still seeing an error.
ISSUE TYPE
BUG REPORT
SUMMARY
We defined securityContext for containers in our deployments, but Kubeaudit still returns an error 'CapabilityOrSecurityContextMissing. Message: Security Context not set'.
ENVIRONMENT
STEPS TO REPRODUCE
Run
kubeaudit all
EXPECTED RESULTS
Not having error 'CapabilityOrSecurityContextMissing. Message: Security Context not set'.
ACTUAL RESULTS
ADDITIONAL INFORMATION
To debug the problem we also tried to output both pod and deployment as a yaml and run Kubeaudit on that, but still seeing an error.
SecurityContext in pod: