# KubernetesManifestResource

- Module: [Aspire.Hosting.Kubernetes](/reference/api/typescript/aspire.hosting.kubernetes.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

Represents an arbitrary Kubernetes manifest that is emitted with a Kubernetes service.

## Definition

```typescript
interface KubernetesManifestResource {
  withAnnotation(
      key: string,
      value: string): KubernetesManifestResource;
  withField(
      path: string,
      value: string|number|boolean): KubernetesManifestResource;
  withLabel(
      key: string,
      value: string): KubernetesManifestResource;
  withNamespace(namespace: string): KubernetesManifestResource;
}
```

## Methods

- [withAnnotation](/reference/api/typescript/aspire.hosting.kubernetes/kubernetesmanifestresource/withannotation.md) -- `method` -- Adds or updates a Kubernetes annotation on this manifest.
    ```typescript
  withAnnotation(key: string, value: string): KubernetesManifestResource
  ```
- [withField](/reference/api/typescript/aspire.hosting.kubernetes/kubernetesmanifestresource/withfield.md) -- `method` -- Adds or updates a manifest field using a dot-separated path.
    ```typescript
  withField(path: string, value: string|number|boolean): KubernetesManifestResource
  ```
- [withLabel](/reference/api/typescript/aspire.hosting.kubernetes/kubernetesmanifestresource/withlabel.md) -- `method` -- Adds or updates a Kubernetes label on this manifest.
    ```typescript
  withLabel(key: string, value: string): KubernetesManifestResource
  ```
- [withNamespace](/reference/api/typescript/aspire.hosting.kubernetes/kubernetesmanifestresource/withnamespace.md) -- `method` -- Sets the namespace for this manifest.
    ```typescript
  withNamespace(namespace: string): KubernetesManifestResource
  ```
