# K8sManifestResource

- Module: [CommunityToolkit.Aspire.Hosting.Kind](/reference/api/typescript/communitytoolkit.aspire.hosting.kind.md)
- Version: `13.5.1-beta.736`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/3ebe72753ae604ec3c9e343865740e6f8512e1b6)

A Kubernetes manifest applied to a Kind cluster via `kubectl apply`.

## Definition

```typescript
interface K8sManifestResource
  extends IResource,
    IResourceWithParent,
    KindClusterResource]],
    IResourceWithWaitSupport {
  applyTimeout: timespan;
  clusterReadyTimeout: timespan;
  crdWaitBehavior: CrdWaitBehavior;
  crdWaitTimeout: timespan;
  fieldManager: string;
  forceConflicts: boolean;
  inlineContent: string;
  isKustomize: boolean;
  readonly manifestPath: string;
  namespace: string;
  recursive: boolean;
  serverSide: boolean;
  withApplyTimeout(timeout: timespan): K8sManifestResource;
  withClusterReadyTimeout(timeout: timespan): K8sManifestResource;
  withCrdWaitBehavior(behavior: CrdWaitBehavior): K8sManifestResource;
  withCrdWaitTimeout(timeout: timespan): K8sManifestResource;
  withFieldManager(fieldManager: string): K8sManifestResource;
  withRecursive(): K8sManifestResource;
  withServerSideApply(forceConflicts?: boolean): K8sManifestResource;
}
```

## Properties

- `applyTimeout`: `timespan` `get - set` -- Gets or sets the maximum time to wait for `kubectl apply` to complete.
- `clusterReadyTimeout`: `timespan` `get - set` -- Gets or sets the maximum time to wait for the Kubernetes API to become reachable before running `kubectl apply`.
- `crdWaitBehavior`: [CrdWaitBehavior](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/crdwaitbehavior.md) `get - set` -- Gets or sets how CRD wait failures are handled.
- `crdWaitTimeout`: `timespan` `get - set` -- Gets or sets the maximum time to wait for applied CRDs to reach the `Established` condition.
- `fieldManager`: `string` `get - set` -- Gets the field manager name used with server-side apply (maps to `kubectl apply --field-manager`). When `null`, kubectl uses its default (`kubectl`).
- `forceConflicts`: `boolean` `get - set` -- Gets or sets whether to force conflicts on server-side apply (maps to `kubectl apply --server-side --force-conflicts`). Only meaningful when `ServerSide` is `true`.
- `inlineContent`: `string` `get - set` -- Gets or sets inline manifest content applied with `kubectl apply -f -`.
- `isKustomize`: `boolean` `get - set` -- Gets or sets whether this resource represents a Kustomize overlay directory.
- `manifestPath`: `string` `get` -- Gets the manifest path passed to `kubectl apply`. Accepts an absolute file path, an absolute directory path, or `<inline>` for standard input.
- `namespace`: `string` `get - set` -- Gets or sets the Kubernetes namespace for the deployment. When `null`, the Helm default namespace is used.
- `recursive`: `boolean` `get - set` -- Gets or sets whether to recursively apply manifests in subdirectories (maps to `kubectl apply --recursive`). Only meaningful when `ManifestPath` is a directory.
- `serverSide`: `boolean` `get - set` -- Gets or sets whether to apply the manifest server-side (maps to `kubectl apply --server-side`). Server-side apply is required for large CRDs that exceed the client-side annotation size limit.

## Methods

- [withApplyTimeout](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withapplytimeout.md) -- `method` -- Sets the maximum time to wait for `kubectl apply` to complete.
    ```typescript
  withApplyTimeout(timeout: timespan): K8sManifestResource
  ```
- [withClusterReadyTimeout](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withclusterreadytimeout.md) -- `method` -- Sets the maximum time to wait for the Kubernetes API to become reachable before running `kubectl apply`.
    ```typescript
  withClusterReadyTimeout(timeout: timespan): K8sManifestResource
  ```
- [withCrdWaitBehavior](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withcrdwaitbehavior.md) -- `method` -- Sets whether CRD wait failures fail the manifest resource or are logged as best-effort warnings.
    ```typescript
  withCrdWaitBehavior(behavior: CrdWaitBehavior): K8sManifestResource
  ```
- [withCrdWaitTimeout](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withcrdwaittimeout.md) -- `method` -- Sets the maximum time to wait for applied CRDs to reach the `Established` condition.
    ```typescript
  withCrdWaitTimeout(timeout: timespan): K8sManifestResource
  ```
- [withFieldManager](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withfieldmanager.md) -- `method` -- Sets the field manager name passed to `kubectl apply --field-manager`.
    ```typescript
  withFieldManager(fieldManager: string): K8sManifestResource
  ```
- [withRecursive](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withrecursive.md) -- `method` -- Recursively applies manifests from subdirectories (maps to `kubectl apply --recursive`). Only meaningful when the manifest path is a directory.
    ```typescript
  withRecursive(): K8sManifestResource
  ```
- [withServerSideApply](/reference/api/typescript/communitytoolkit.aspire.hosting.kind/k8smanifestresource/withserversideapply.md) -- `method` -- Applies the manifest server-side (maps to `kubectl apply --server-side`). Required for large CRDs that exceed the client-side annotation size limit.
    ```typescript
  withServerSideApply(forceConflicts?: boolean): K8sManifestResource
  ```
