# K3sClusterResource.WithKubectlImage

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

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

## Definition

```go
type K3sClusterResource interface {
    // ... omitted for brevity
    WithKubectlImage(options ...*WithKubectlImageOptions) K3sClusterResource
}
```

## Signature

```go
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()`.

## Defined on

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