# K8sManifestResource Constructors

- Package: [CommunityToolkit.Aspire.Hosting.K3s](/reference/api/csharp/communitytoolkit.aspire.hosting.k3s.md)
- Type: [K8sManifestResource](/reference/api/csharp/communitytoolkit.aspire.hosting.k3s/k8smanifestresource.md)
- Kind: `Constructors`
- Members: `1`

Represents a Kubernetes manifest (or Kustomize overlay) applied to the parent k3s cluster.

<a id="constructor"></a>
<a id="constructor-string-string-k3sclusterresource"></a>

## K8sManifestResource(string, string, K3sClusterResource)

- Name: `Constructor(string, string, K3sClusterResource)`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.K3s/K8sManifestResource.cs#L19-L28)

Represents a Kubernetes manifest (or Kustomize overlay) applied to the parent k3s cluster.

```csharp
public sealed class K8sManifestResource
{
    public K8sManifestResource(
        string name,
        string path,
        K3sClusterResource cluster)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The Aspire resource name.
- `path` (`string`)
  Absolute path to the YAML file, plain directory, or Kustomize directory.
- `cluster` ([K3sClusterResource](/reference/api/csharp/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md))
  The parent k3s cluster resource.

## Remarks

The resource runs as an `alpine/kubectl` container. It polls until the cluster kubeconfig is available, then applies the manifests with `kubectl apply --server-side` and waits for any CRDs to reach the `Established` condition before exiting with code 0. Use `WaitForCompletion(manifest)` on resources that depend on these manifests being applied.
