# EnvVarV1 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [EnvVarV1](/reference/api/csharp/aspire.hosting.kubernetes/envvarv1.md)
- Kind: `Properties`
- Members: `3`

EnvVarV1 represents an environment variable in a Kubernetes resource. It is used to define key-value pairs or to derive values from other Kubernetes resources through a configurable source.

## Name

- Name: `Name`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/EnvVarV1.cs)

Gets or sets the name of the environment variable. This property specifies the name of the environment variable and is a required field.

```csharp
public string Name { get; set; }
```

## Value

- Name: `Value`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/EnvVarV1.cs)

Gets or sets the literal value of the environment variable. This property is used to specify a constant string value that will be set directly as the environment variable's value in the container configuration.

```csharp
public string Value { get; set; }
```

## ValueFrom

- Name: `ValueFrom`
- Modifiers: `nullable` `get; set`
- Returns: [EnvVarSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/envvarsourcev1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/EnvVarV1.cs)

Gets or sets the source for the environment variable value. This property allows specifying an external source from which the environment variable value will be derived, such as a key in a ConfigMap, a field reference from the object's metadata, a resource field (e.g., limits or requests for memory or CPU), or a key in a Secret.

```csharp
public EnvVarSourceV1? ValueFrom { get; set; }
```
