# WithKafkaUI

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

Adds a Kafka UI container to the application, configured to connect to the Redpanda broker. This is the same Kafka management UI (the `kafbat/kafka-ui` image) used by the official Aspire Kafka integration, so it works against any Kafka API compatible broker.

## Remarks

This version of the package defaults to the tag of the container image.

## Definition

```go
func (RedPandaServerResource) WithKafkaUI(options ...*WithKafkaUIOptions) RedPandaServerResource
```

## Parameters

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

## Options

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

- `ConfigureContainer` (`func(obj RedPandaKafkaUiContainerResource)`) `callback` -- An optional callback to configure the Kafka UI container resource.
- `ContainerName` (`*string`) -- The name of the container (optional).

## Returns

[`RedPandaServerResource`](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource.md) -- A reference to the `IResourceBuilder` for the Redpanda server resource.

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

## Applies to

- [`RedPandaServerResource`](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource.md)
