# Secret Constructors

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [Secret](/reference/api/csharp/aspire.hosting.kubernetes/secret.md)
- Kind: `Constructors`
- Members: `1`

Represents a Kubernetes Secret resource in the v1 API version.

## Secret

- Name: `Constructor`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/SecretV1.cs#L17-L65)

Represents a Kubernetes Secret resource in the v1 API version.

```csharp
public sealed class Secret
{
    public Secret()
    {
        // ...
    }
}
```

## Remarks

The `Secret` class is used to store sensitive information, such as passwords, OAuth tokens, and other secrets. Secrets are encoded as key-value pairs and can be mounted into containers or referenced by other Kubernetes resources. By default, the data is Base64-encoded, and alternative string-based representations can also be used.
