# WithKubectlImage

- Module: [CommunityToolkit.Aspire.Hosting.K3s](/reference/api/go/communitytoolkit.aspire.hosting.k3s.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: [`K3sClusterResource`](/reference/api/go/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md)
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Overrides the container image used to run `kubectl apply` for all `K8sManifestResource` children of this cluster.

## Definition

```go
func (K3sClusterResource) WithKubectlImage(options ...*WithKubectlImageOptions) K3sClusterResource
```

## Parameters

- `options` (`...*WithKubectlImageOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithKubectlImageOptions` argument.

- `Tag` (`*string`) -- Image tag, e.g. `1.37.0`. `null` keeps the current value.
- `Image` (`*string`) -- Image name, e.g. `alpine/kubectl`. `null` keeps the current value.
- `Registry` (`*string`) -- Registry, e.g. `docker.io`. `null` keeps the current value.

## Returns

[`K3sClusterResource`](/reference/api/go/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md) -- The same builder, for chaining.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`K3sClusterResource`](/reference/api/go/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md)
