Skip to content

Commit da0c087

Browse files
authored
Provide a unified configuration guide for Kubernetes (#1344)
1 parent 7c1a60b commit da0c087

2 files changed

Lines changed: 73 additions & 156 deletions

File tree

modules/manage/pages/kubernetes/k-cluster-property-configuration.adoc

Lines changed: 0 additions & 148 deletions
This file was deleted.

modules/manage/pages/kubernetes/k-configure-helm-chart.adoc

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= Configure Redpanda in Kubernetes
2-
:description: Customize the values of the Redpanda Helm chart to configure the cluster and the Kubernetes components that the chart deploys.
2+
:description: Customize the values of the Redpanda Helm chart or Redpanda resource to configure both the Redpanda cluster and the Kubernetes components.
33
:tags: ["Kubernetes"]
4-
:page-aliases: manage:kubernetes/helm-configuration.adoc, manage:helm-configuration.adoc, deploy-self-hosted:arbitrary-configuration.adoc, features:kubernetes-additional-config.adoc, deployment:arbitrary-configuration.adoc, deployment:kubernetes-additional-config.adoc, manage:kubernetes/configure-helm-chart.adoc
4+
:page-aliases: manage:kubernetes/helm-configuration.adoc, manage:helm-configuration.adoc, deploy-self-hosted:arbitrary-configuration.adoc, features:kubernetes-additional-config.adoc, deployment:arbitrary-configuration.adoc, deployment:kubernetes-additional-config.adoc, manage:kubernetes/configure-helm-chart.adoc, manage:kubernetes/k-cluster-property-configuration.adoc
55
:page-categories: Management
66
:env-kubernetes: true
77

@@ -145,11 +145,11 @@ The values in the `--set` options override their counterparts in the Helm chart'
145145

146146
NOTE: If you're upgrading and you already have Redpanda Console installed, set `console.enabled` to `false` to stop Helm from trying to deploy it again.
147147

148-
== Specify Redpanda CLI flags in the Helm Chart
148+
=== Set Redpanda CLI flags
149149

150-
The Redpanda Helm chart allows you to specify Redpanda CLI flags, such as `--smp`, `--memory`, or `--reserve-memory`, directly rather than having to find the appropriate configuration in the chart's values.
150+
You can specify Redpanda CLI flags, such as `--smp`, `--memory`, or `--reserve-memory`, directly rather than having to find the appropriate stanza in the YAML values.
151151

152-
When you specify CLI flags, those values take precedence over the values defined in the chart's values.
152+
When you specify CLI flags, those values take precedence over the values defined in the YAML values.
153153

154154
[tabs]
155155
======
@@ -210,8 +210,26 @@ helm upgrade --install redpanda redpanda/redpanda \
210210
--
211211
======
212212

213+
=== Set Redpanda cluster properties
214+
215+
Cluster properties control the core behavior of your Redpanda cluster, such as topic auto-creation, log retention, and feature flags. You can set any cluster property using the `config.cluster` field in your Helm values or Redpanda custom resource.
216+
217+
For a full list of available properties and their defaults, see xref:reference:cluster-properties.adoc[cluster configuration properties].
218+
219+
.Example: Enable automatic topic creation
220+
[,yaml]
221+
----
222+
config:
223+
cluster:
224+
auto_create_topics_enabled: true
225+
----
226+
227+
You can set multiple properties under `config.cluster` as needed. This method works for all cluster properties, including those for advanced features like Tiered Storage.
228+
229+
To set cluster properties using the Operator or Helm, add the `config.cluster` block to your YAML file or use the `--set` flag. See the examples below for both approaches.
230+
213231
[[extra-cluster-config]]
214-
== Set Redpanda cluster properties from Kubernetes Secrets or ConfigMaps
232+
=== Use Kubernetes Secrets or ConfigMaps
215233

216234
Starting in v25.1.1 of the Redpanda Operator and Redpanda Helm chart, you can set **any Redpanda cluster configuration property** by referencing Kubernetes Secrets or ConfigMaps using the `config.extraClusterConfiguration` field.
217235

@@ -301,8 +319,55 @@ You can apply this approach to any Redpanda configuration key, making your deplo
301319

302320
For full configuration options, see xref:reference:properties/index.adoc[].
303321

322+
=== Export a Redpanda configuration file
323+
324+
To see all Redpanda configurations for a broker, you can use the `rpk cluster config export` command to save the current Redpanda configuration to a file. For example, you may want to use the configuration file during debugging.
325+
326+
TIP: To get more detailed information about your Redpanda deployment, generate a xref:manage:kubernetes/troubleshooting/k-diagnostics-bundle.adoc[diagnostics bundle], which includes the Redpanda configuration files for all brokers in the cluster.
327+
328+
. Execute the `rpk cluster config export` command inside a Pod container that's running a Redpanda broker.
329+
+
330+
```bash
331+
kubectl exec redpanda-0 --namespace <namespace> -c redpanda -- \
332+
rpk cluster config export --filename <filename>.yaml
333+
```
334+
+
335+
To save the configuration file outside of your current working directory, provide an absolute path to the `--filename` flag. Otherwise, the file is saved in your current working directory.
336+
+
337+
Example output
338+
+
339+
```
340+
Wrote configuration to file "/tmp/config_625125906.yaml".
341+
```
342+
343+
. On your host machine, make a directory in which to save the configuration file:
344+
+
345+
```bash
346+
mkdir configs
347+
```
348+
349+
. Copy the configuration file from the Pod to your host machine:
350+
+
351+
Replace `<path-to-file>` with the path to your exported file.
352+
+
353+
```bash
354+
kubectl cp redpanda/redpanda-0:<path-to-file> configs/redpanda-0-configuration-file.yaml
355+
```
356+
357+
. Remove the exported file from the Redpanda container:
358+
+
359+
```bash
360+
kubectl exec redpanda-0 -c redpanda --namespace <namespace> -- rm <path-to-file>
361+
```
362+
363+
When you've finished with the file, remove it from your host machine:
364+
365+
```bash
366+
rm -r configs
367+
```
368+
304369
[[reset-config]]
305-
== Reset configuration values
370+
=== Reset configuration values
306371

307372
You may want to reset a configuration value back to its default. The method to do this depends on how you're managing your Redpanda deployment.
308373

@@ -449,7 +514,7 @@ Use `helm install` to install or reinstall Redpanda. Use `helm upgrade` to recon
449514

450515
=== Reinstall Redpanda
451516

452-
When reinstalling Redpanda with `helm install`, cluster configuration overrides specified in the Helm values may not take effect due to PersistentVolumeClaim (PVC) retention.
517+
When reinstalling Redpanda with `helm install`, cluster configuration overrides specified in the Helm values may not take effect due to PersistentVolumeClaim (PVC) retention.
453518

454519
By default, most PVCs are retained when a Helm release is uninstalled. As a result, when Redpanda is reinstalled, the previously created PVCs are adopted, restoring the state of the previous cluster. This adoption results in the new `bootstrap.yaml` file being ignored and the `post_upgrade` job not running. The `post_upgrade` job is a component in the Helm chart that applies configuration overrides during an upgrade.
455520

0 commit comments

Comments
 (0)