# RedPandaBuilderExtensions

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.RedPanda](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda.md)
- Version: `13.5.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1/src/CommunityToolkit.Aspire.Hosting.RedPanda/RedPandaBuilderExtensions.cs)

Provides extension methods for adding Redpanda resources to an `Hosting.IDistributedApplicationBuilder`.

## Definition

```csharp
namespace Aspire.Hosting;

public static class RedPandaBuilderExtensions
{
    // ...
}
```

## Methods

- [AddRedPanda(IDistributedApplicationBuilder, string, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#addredpanda-idistributedapplicationbuilder-string-int) : `IResourceBuilder<RedPandaServerResource>` `extension` `ats export` -- Adds a Redpanda container resource to the application. Redpanda is a Kafka API compatible streaming platform, so the resource can be referenced by any Kafka client integration.
- [AddRedPanda(IDistributedApplicationBuilder, string, Action<RedPandaServerOptions>, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#addredpanda-idistributedapplicationbuilder-string-action-redpandaserveroptions-int) : `IResourceBuilder<RedPandaServerResource>` `extension` `ats ignored` -- Adds a Redpanda container resource to the application, using a delegate to configure broker options such as the CPU and memory limits. Redpanda is a Kafka API compatible streaming platform, so the resource can be referenced by any Kafka client integration.
- [WithConsole(IResourceBuilder<RedPandaServerResource>, Action<IResourceBuilder<RedPandaConsoleContainerResource>>, string?)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#withconsole-iresourcebuilder-redpandaserverresource-action-iresourcebuilder-redpandaconsolecontainerresource-string) : `IResourceBuilder<RedPandaServerResource>` `extension` `ats export` -- Adds a Redpanda Console container to the application, configured to connect to the Redpanda broker.
- [WithDataBindMount(IResourceBuilder<RedPandaServerResource>, string, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#withdatabindmount-iresourcebuilder-redpandaserverresource-string-bool) : `IResourceBuilder<RedPandaServerResource>` `extension` `ats export` -- Adds a bind mount for the data folder to a Redpanda container resource.
- [WithDataVolume(IResourceBuilder<RedPandaServerResource>, string?, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#withdatavolume-iresourcebuilder-redpandaserverresource-string-bool) : `IResourceBuilder<RedPandaServerResource>` `extension` `ats export` -- Adds a named volume for the data folder to a Redpanda container resource.
- [WithHostPort(IResourceBuilder<RedPandaConsoleContainerResource>, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#withhostport-iresourcebuilder-redpandaconsolecontainerresource-int) : `IResourceBuilder<RedPandaConsoleContainerResource>` `extension` `ats export` -- Configures the host port that the Redpanda Console resource is exposed on instead of using a randomly assigned port.
- [WithHostPort(IResourceBuilder<RedPandaKafkaUiContainerResource>, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#withhostport-iresourcebuilder-redpandakafkauicontainerresource-int) : `IResourceBuilder<RedPandaKafkaUiContainerResource>` `extension` `ats ignored` -- Configures the host port that the Kafka UI resource is exposed on instead of using a randomly assigned port.
- [WithKafkaUI(IResourceBuilder<RedPandaServerResource>, Action<IResourceBuilder<RedPandaKafkaUiContainerResource>>, string?)](/reference/api/csharp/communitytoolkit.aspire.hosting.redpanda/redpandabuilderextensions/methods.md#withkafkaui-iresourcebuilder-redpandaserverresource-action-iresourcebuilder-redpandakafkauicontainerresource-string) : `IResourceBuilder<RedPandaServerResource>` `extension` `ats export` -- 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.
