Share via


SecurityContextV1.RunAsNonRoot Property

Definition

Specifies whether the container must run as a non-root user. Setting this property to true ensures that the container does not run with root privileges, enforcing an additional layer of security. If this property is set to true, the Kubernetes scheduler will validate that the container does not run as root at runtime.

[YamlDotNet.Serialization.YamlMember(Alias="runAsNonRoot")]
public bool? RunAsNonRoot { get; set; }
[<YamlDotNet.Serialization.YamlMember(Alias="runAsNonRoot")>]
member this.RunAsNonRoot : Nullable<bool> with get, set
Public Property RunAsNonRoot As Nullable(Of Boolean)

Property Value

Attributes
YamlDotNet.Serialization.YamlMemberAttribute

Applies to