# KubernetesManifestResource

- Module: [Aspire.Hosting.Kubernetes](/reference/api/go/aspire.hosting.kubernetes.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

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

## Definition

```go
type KubernetesManifestResource interface{}
```

## Properties

- `Metadata`: [`ObjectMetaV1`](/reference/api/go/aspire.hosting.kubernetes/objectmetav1.md) `get/set` -- Gets or sets the metadata for the Kubernetes resource.

## Methods

- [WithAnnotation](/reference/api/go/aspire.hosting.kubernetes/kubernetesmanifestresource/withannotation.md) -- `method` -- Adds or updates a Kubernetes annotation on this manifest.
  ```go
  WithAnnotation(key string, value string) KubernetesManifestResource
  ```
- [WithField](/reference/api/go/aspire.hosting.kubernetes/kubernetesmanifestresource/withfield.md) -- `method` -- Adds or updates a manifest field using a dot-separated path.
  ```go
  WithField(path string, value any) KubernetesManifestResource
  ```
- [WithLabel](/reference/api/go/aspire.hosting.kubernetes/kubernetesmanifestresource/withlabel.md) -- `method` -- Adds or updates a Kubernetes label on this manifest.
  ```go
  WithLabel(key string, value string) KubernetesManifestResource
  ```
- [WithNamespace](/reference/api/go/aspire.hosting.kubernetes/kubernetesmanifestresource/withnamespace.md) -- `method` -- Sets the namespace for this manifest.
  ```go
  WithNamespace(namespace string) KubernetesManifestResource
  ```
