SecurityContext - Lab question - Getting wrong answer

(1) The provided solution says D is the correct answer
But why is A also not the correct answer. Shouldn’t both A and D be correct?

(2) Different question: Is runAsUser: root not permitted? (Reference: B and C) anytime i specify runAsUser: root it throws error.

  1. “A” cannot be correct – capabilities are not allowed in spec-level securityContext blocks; you’ll get a syntax error.
  2. The field must be an integer, so runAsUser: root will fail due to a type clash. But runAsUser: 0 appears to be allowed.
1 Like