Secret Properties
Class Properties 4 members
Represents a Kubernetes Secret resource in the v1 API version.
Represents a collection of base64-encoded data entries within a Kubernetes Secret resource.
public Dictionary<string, string> Data { get; }Remarks
The Data property serves as a storage mechanism for sensitive data, such as credentials or configurations, within a Kubernetes Secret object. The property uses a dictionary structure, where the keys correspond to the names of the data entries, and the values are the base64-encoded strings representing the actual data content. It is important to note that Data values must be encoded in base64 format before assignment. When managing secrets, Kubernetes ensures that these values are securely handled and accessible only within the designated scope provided by the resource.
Indicates whether the Secret is immutable.
public bool? Immutable { get; set; }Remarks
When set to true, the Secret object becomes immutable, meaning that its contents cannot be altered after creation. This ensures the integrity of the data stored in the Secret and prevents unintended modifications. If null or set to false, the Secret can be updated.
Represents a dictionary of non-base64 encoded strings that will be used to populate a Kubernetes Secret object.
public Dictionary<string, string> StringData { get; }Remarks
The StringData property allows users to provide secret data as plain text values instead of base64-encoded strings. When the Kubernetes API processes the secret manifest, these string values will be encoded into base64 and stored in the `Data` field of the Secret. This is a convenience feature to simplify secret creation for developers.
Represents the type of the Kubernetes Secret resource.
public string Type { get; set; }Remarks
The Type property specifies the type of data stored within the Secret. It determines the intended use case or interpretation of the stored secret data. The default value is "Opaque," which is used for arbitrary user-defined data.