# Namespace

- Kind: `class`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Kubernetes.Resources`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/NamespaceV1.cs)
- Inherits: [BaseKubernetesResource](/reference/api/csharp/aspire.hosting.kubernetes/basekubernetesresource.md)

Represents a Kubernetes Namespace resource in the v1 API version.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

public sealed class Namespace
    : Aspire.Hosting.Kubernetes.Resources.BaseKubernetesResource
{
    // ...
}
```

## Remarks

The Namespace class defines the structure for the Kubernetes Namespace resource, including metadata and specification details. It inherits from the BaseKubernetesResource class to leverage shared properties such as ApiVersion, Kind, and Metadata. This class enables serialization and deserialization of Namespace resources using YAML.

## Constructors

- [Namespace](/reference/api/csharp/aspire.hosting.kubernetes/namespace/constructors.md#constructor) -- Represents a Kubernetes Namespace resource in the v1 API version.

## Properties

- [Spec](/reference/api/csharp/aspire.hosting.kubernetes/namespace/properties.md#spec) : [NamespaceSpecV1](/reference/api/csharp/aspire.hosting.kubernetes/namespacespecv1.md) `get; set` -- Gets or sets the specification for the Kubernetes Namespace resource.
