Skip to content

Commit 4f3a993

Browse files
JakeSCahillDeflaimunFeediver1pgellertasimms41
authored
DOC-546 Document the new useFlux flag (#859)
Co-authored-by: Paulo Borges <[email protected]> Co-authored-by: Joyce Fee <[email protected]> Co-authored-by: Gellért Peresztegi-Nagy <[email protected]> Co-authored-by: Angela Simms <[email protected]> Co-authored-by: Kat Batuigas <[email protected]> Co-authored-by: Michele Cyran <[email protected]>
1 parent 9954263 commit 4f3a993

File tree

3 files changed

+106
-66
lines changed

3 files changed

+106
-66
lines changed

modules/deploy/pages/deployment-option/self-hosted/kubernetes/k-deployment-overview.adoc

Lines changed: 65 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,106 +5,120 @@
55
:env-kubernetes: true
66
:page-categories: Deployment, GitOps
77

8-
Kubernetes is a container orchestration tool that helps you manage Redpanda deployments using declarative configuration files called _manifests_.
9-
Kubernetes provides a standardized way of achieving the following:
8+
Kubernetes is a container orchestration tool that helps you manage Redpanda deployments using declarative configuration files called _manifests_. Kubernetes provides a standardized way of achieving the following:
109

1110
* High availability
1211
* Disaster recovery
1312
* Scalability
1413
15-
== Redpanda Helm chart vs Redpanda Operator
14+
== Deployment tools
1615

17-
To deploy Redpanda in Kubernetes, you can choose to use Helm for its simplicity, or combine Helm with the Redpanda Operator to leverage custom resource definitions (CRDs) for a more GitOps-friendly deployment process. Redpanda Operator is the recommended deployment option.
16+
To deploy Redpanda in Kubernetes, you can choose to use Helm for its simplicity or the Redpanda Operator to leverage custom resource definitions (CRDs) for a more GitOps-friendly deployment process. The Redpanda Operator is the recommended option for production deployments.
1817

1918
|===
20-
| Feature | Helm | Helm + Redpanda Operator
19+
| Feature | Helm | Redpanda Operator
2120

2221
| *Version management*
23-
| Directly supported through Helm, enabling updates and rollbacks.
24-
| Managed through Helm.
22+
| Supported through Helm, enabling updates and rollbacks.
23+
| Managed through Redpanda custom resources, with optional integration with Flux for GitOps workflows.
2524

2625
| *Multi-tenant Kubernetes clusters*
27-
| Supported. Helm allows you to deploy multiple independent Redpanda clusters by defining different Helm release names.
28-
| Supported. The Redpanda Operator enables a more declarative approach for managing multi-tenant clusters using the RedpandaList custom resource.
26+
| Supported. Helm allows deployment of multiple independent Redpanda clusters by defining different Helm release names.
27+
| Supported. The Redpanda Operator provides a declarative approach for managing multi-tenant clusters using the RedpandaList custom resource.
2928

3029
| *Dependency and configuration management*
31-
| Managed directly through the Redpanda Helm chart.
32-
| Configurations defined in custom resources are passed to Helm, which then manages the dependencies and configurations.
30+
| Managed through the Redpanda Helm chart.
31+
| Configurations are defined in custom resources.
3332
|===
3433

35-
TIP: If you are already using the Redpanda Helm chart and want to migrate to the latest Redpanda Operator to manage your deployment, see xref:upgrade:migrate/kubernetes/helm-to-operator.adoc[Migrate from the Redpanda Helm chart].
34+
TIP: If you are already using the Redpanda Helm chart and want to migrate to the latest Redpanda Operator for better lifecycle management, see xref:upgrade:migrate/kubernetes/helm-to-operator.adoc[Migrate from the Redpanda Helm chart].
3635

3736
=== Helm
3837

39-
https://helm.sh/docs[Helm^] is a package manager for Kubernetes, which simplifies the process of defining, installing, and upgrading Kubernetes applications. Helm uses charts, a collection of files that describe a related set of Kubernetes resources, to deploy applications in a Kubernetes cluster.
38+
https://helm.sh/docs[Helm^] is a package manager for Kubernetes that simplifies defining, installing, and upgrading Kubernetes applications. Helm uses charts, a collection of files describing Kubernetes resources, to deploy applications in a Kubernetes cluster.
4039

41-
The Redpanda Helm chart generates and applies all the manifest files you need for deploying Redpanda in Kubernetes, including:
40+
The Redpanda Helm chart provides all the manifest files required to deploy Redpanda in Kubernetes, including:
4241

43-
- The StatefulSet to manage the Redpanda brokers.
44-
- A Headless ClusterIP Service for internal communication with the Redpanda cluster.
45-
- A NodePort Service for external communication with the Redpanda cluster.
42+
- A StatefulSet to manage Redpanda brokers
43+
- A Headless ClusterIP Service for internal communication with the Redpanda cluster
44+
- A NodePort Service for external communication with the Redpanda cluster
4645

47-
The Redpanda Helm chart comes with default settings that enable a straightforward deployment out of the box. However, Helm also offers customization by allowing you to override these default values.
4846

49-
You can override the defaults in your own YAML files using the `--values` option or directly in the command line with the `--set` option. These changes in Helm chart values not only influence the configuration of the Redpanda cluster, but also determine what Kubernetes resources are deployed and how these resources are configured.
47+
[[helm-and-redpanda-operator]]
48+
=== Redpanda Operator
5049

51-
=== Helm and Redpanda Operator
50+
The Redpanda Operator provides two deployment modes controlled by the `useFlux` flag. The modes differ in how reconciliation is handled:
5251

53-
The recommended option for deploying Redpanda in Kubernetes is a combination of <<Helm>> and the Redpanda Operator. While the Helm chart facilitates the deployment of Redpanda, the Redpanda Operator manages the lifecycle of Redpanda clusters. The operator uses https://fluxcd.io/flux/concepts/[Flux^] to automate the deployment of the Redpanda Helm chart through the HelmRelease resource.
52+
- *Flux-managed mode (`useFlux: true`)*:
53+
When `useFlux` is set to `true` (default), the Redpanda Operator delegates reconciliation to https://fluxcd.io/flux/concepts/[Flux^] controllers. The workflow is as follows:
54+
+
55+
. The Redpanda Operator defines the necessary CRDs for Redpanda. A Redpanda resource represents a Redpanda cluster, configured through the Redpanda Helm chart values.
56+
. When the Redpanda Operator detects changes to Redpanda resources, it triggers Flux to reconcile the corresponding HelmRelease resource.
57+
. Flux uses the HelmRelease resource to manage the lifecycle of the Redpanda Helm chart, applying updates as needed.
5458

55-
Flux, when integrated with the Redpanda Operator, uses the HelmRelease resource to manage the lifecycle of the Redpanda Helm chart in the Kubernetes cluster. This integration streamlines the creation and management of Redpanda clusters, ensuring they are always in the desired state as defined by the operator's custom resource definitions (CRDs).
59+
- *Redpanda-managed mode (`useFlux: false`)*:
60+
When `useFlux` is set to `false`, the Redpanda Operator manages and reconciles Redpanda resources directly, without involving Flux. This mode works as follows:
61+
+
62+
. The Redpanda Operator creates both `HelmRelease` and `HelmRepository` resources but suspends them, keeping Flux inactive.
63+
+
64+
NOTE: Although these resources are created in a suspended state, the operator still requires the Flux CRDs to be installed.
65+
. The operator directly reconciles Redpanda resources, performing tasks such as installations, updates, and cleanup, normally handled by Flux.
66+
. If `useFlux` is later re-enabled, the operator unsuspends the Flux resources, and Flux resumes lifecycle management.
5667

57-
image::shared:operator-flux-relationship.png[CRDs for the Redpanda Operator include Flux CRDs. Flux manages the Redpanda Helm chart through the HelmRelease resource.]
58-
59-
Here's how it works with Flux:
68+
Example configuration to specify the deployment mode in Redpanda's custom resource:
6069

61-
. The Redpanda Operator defines the necessary CRDs for Redpanda. The Redpanda resource represents a Redpanda cluster that's configured using values from the Redpanda Helm chart.
62-
. When the Redpanda Operator detects changes to these Redpanda resources, it triggers Flux to reconcile the corresponding HelmRelease resource.
63-
. Flux uses the HelmRelease resource to manage the lifecycle of the Redpanda Helm chart in the cluster.
70+
[,yaml]
71+
----
72+
apiVersion: cluster.redpanda.com/v1alpha2
73+
kind: Redpanda
74+
metadata:
75+
name: redpanda
76+
spec:
77+
clusterSpec:
78+
useFlux: true # or false, depending on your desired deployment mode
79+
----
6480

65-
If you already have Flux installed in your environment, you can disable the Flux HelmReleaseController and SourceController in the Redpanda Operator to prevent redundant reconciliations of HelmRelease resources. For details, see xref:./k-production-deployment.adoc#config-operator[Deploy a Redpanda cluster].
81+
image::shared:operator-flux-relationship.png[CRDs for the Redpanda Operator include Flux CRDs. Flux manages the Redpanda Helm chart through the HelmRelease resource.]
6682

67-
== Managed vs bare-metal
83+
== Kubernetes deployment environments
6884

69-
You can run Redpanda on managed Kubernetes services as well as in bare-metal environments. Managed Kubernetes services offer simpler deployment and maintenance, while bare-metal environments provide complete control and potential cost efficiencies.
85+
You can run Redpanda on managed Kubernetes services as well as in bare-metal environments. Managed Kubernetes services offer simpler deployment and maintenance, while bare-metal environments provide complete control and cost efficiencies.
7086

7187
=== Managed Kubernetes
7288

73-
Managed Kubernetes services manage one or more components of a Kubernetes cluster for you. Several cloud computing vendors provide this service, such as Google Cloud's Google Kubernetes Engine (GKE) and Amazon Web Services' Elastic Kubernetes Service (EKS).
74-
75-
Managed Kubernetes platforms provide the following benefits:
89+
Managed Kubernetes services, such as Google Kubernetes Engine (GKE) and Amazon Elastic Kubernetes Service (EKS), handle core components of a Kubernetes cluster, offering benefits such as:
7690

77-
* *Ease of deployment*: Managed Kubernetes platforms allow you to provision cloud instances to serve as worker nodes. These instances are pre-configured with Kubernetes agent software and automatically join your Kubernetes cluster, making the process of deploying Redpanda simpler and more efficient.
78-
* *Control plane maintenance*: The managed service provider maintains and updates the control plane software, ensuring that it remains secure, reliable, and up-to-date.
79-
* *Health monitoring and repairs*: The health of the master nodes is continuously monitored, and repairs are made as necessary. This provides an additional level of confidence in the reliability of the platform.
91+
* *Ease of deployment*: Pre-configured instances join your Kubernetes cluster automatically.
92+
* *Control plane maintenance*: The provider maintains the control plane, ensuring security and reliability.
93+
* *Health monitoring and repairs*: The provider monitors master nodes and repairs them as needed.
8094

81-
However, you are still responsible for deploying and maintaining your Redpanda instances on the worker nodes.
95+
You remain responsible for deploying and maintaining Redpanda instances on worker nodes.
8296

8397
=== Bare-metal Kubernetes environments
8498

85-
Bare-metal Kubernetes environments refer to any deployments where you are responsible for both the control plane and the worker nodes. Running Redpanda on bare-metal environments offers several advantages:
99+
Bare-metal Kubernetes environments give you complete control over both the control plane and the worker nodes, which can be advantageous when you want the following:
86100

87-
* *Complete control*: With bare-metal Kubernetes, you have full control over every aspect of the deployment. Bare-metal deployments may be beneficial when your needs aren't addressed by managed Kubernetes services.
88-
* *Custom configuration*: Bare-metal allows for granular control over the Kubernetes configuration, meaning you can fine-tune the environment.
89-
* *Cost efficiency*: Owning and operating your own hardware may prove to be more cost-effective.
101+
* *Complete control*: Bare-metal Kubernetes offers control over every aspect of deployment, suited for highly customized environments.
102+
* *Custom configurations*: You have granular control to fine-tune the Kubernetes setup.
103+
* *Cost efficiency*: Owning and operating your hardware may be more economical over time.
90104

91105
== Documentation conventions
92106

93-
The Kubernetes documentation follows these conventions:
107+
This documentation follows conventions to help users easily identify Kubernetes resource types and Helm values:
94108

95-
* Resource names: Kubernetes resources names, such as Service or PersistentVolume, are distinguished by the use of Pascal case. These are the names of resources when specified as a kind in manifest files.
96-
* Helm values: Helm values, such as `storage.persistentVolume.enabled`, are rendered in monospace font and written according to the JSON path specification.
109+
* *Resource names*: Kubernetes resource names, such as Service or PersistentVolume, are capitalized and in Pascal case to match the manifest files.
110+
* *Helm values*: Helm values, like `storage.persistentVolume.enabled`, are displayed in monospace font.
97111

98112
== Next steps
99113

100-
Whether you're deploying locally or in the cloud, choose one of the following guides to get you started:
114+
Whether you're deploying locally or in the cloud, choose one of the following guides to get started:
101115

102-
* xref:./local-guide.adoc[Local] (kind and minikube)
103-
* xref:./aks-guide.adoc[Azure Kubernetes Service] (AKS)
104-
* xref:./eks-guide.adoc[Elastic Kubernetes Service] (EKS)
105-
* xref:./gke-guide.adoc[Google Kubernetes Engine] (GKE)
116+
* xref:./local-guide.adoc[Local Deployment Guide] (kind and minikube)
117+
* xref:./aks-guide.adoc[Azure Kubernetes Service Guide] (AKS)
118+
* xref:./eks-guide.adoc[Elastic Kubernetes Service Guide] (EKS)
119+
* xref:./gke-guide.adoc[Google Kubernetes Engine Guide] (GKE)
106120

107-
Or, you can explore our xref:./k-production-workflow.adoc[production workflow] to learn more about the requirements and best practices.
121+
Or, explore our xref:./k-production-workflow.adoc[production workflow] to learn about requirements and best practices.
108122

109123
include::shared:partial$suggested-reading.adoc[]
110124

modules/deploy/pages/deployment-option/self-hosted/kubernetes/k-production-deployment.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:env-kubernetes: true
88
:page-categories: Deployment, GitOps
99

10-
This topic describes how to configure and deploy one or more Redpanda clusters in Kubernetes.
10+
This topic describes how to configure and deploy one or more Redpanda clusters and Redpanda Console in Kubernetes.
1111

1212
== Prerequisites
1313

@@ -17,11 +17,9 @@ You must already have a ConfigMap that stores your `io-config.yaml` file. See xr
1717

1818
== Deploy a Redpanda cluster
1919

20-
To deploy Redpanda, you can use the following methods. Regardless of the method you choose to deploy Redpanda, you'll deploy the Redpanda Helm chart, which includes Redpanda and Redpanda Console. Redpanda Console comes bundled as a subchart within the Redpanda Helm chart.
20+
To deploy Redpanda and Redpanda Console, you can use the following tools:
2121

2222
- *Helm and the Redpanda Operator*: The Redpanda Operator extends Kubernetes with custom resource definitions (CRDs), allowing you to define Redpanda clusters as native Kubernetes resources. The resource that the Redpanda Operator uses to represent a Redpanda cluster is the Redpanda resource.
23-
+
24-
The Redpanda Operator handles the deployment and management of the Redpanda Helm chart for you by using https://fluxcd.io/flux/concepts/[Flux^]. When you deploy a Redpanda resource, the Redpanda Operator takes that configuration and passes it to Flux. Flux, in turn, interacts with Helm, by creating the necessary HelmRepository and HelmRelease resources to deploy and manage the Redpanda Helm chart.
2523
- *Helm*: https://helm.sh/docs[Helm^] is a package manager for Kubernetes, which simplifies the process of defining, installing, and upgrading Kubernetes applications. Helm uses charts, a collection of files that describe a related set of Kubernetes resources, to deploy applications in a Kubernetes cluster.
2624

2725
TIP: For more details about the differences between these two methods, see xref:./k-deployment-overview.adoc[].
@@ -105,6 +103,7 @@ spec:
105103
chartRef:
106104
chartVersion: {latest-redpanda-helm-chart-version}
107105
clusterSpec:
106+
#useFlux: true
108107
#enterprise:
109108
#licenseSecretRef:
110109
#name: <secret-name>
@@ -125,6 +124,7 @@ spec:
125124
- xref:reference:k-crd.adoc#k8s-api-github-com-redpanda-data-redpanda-operator-api-redpanda-v1alpha2-chartref[`spec.chartRef`]: Information about the Helm chart that will be used to deploy Redpanda.
126125
- `spec.chartRef.chartVersion`: This field specifies the exact version of the Redpanda Helm chart to use for deployment. By setting this value, you <<version-pinning, pin the chart to a specific version>>, which prevents automatic updates that might introduce breaking changes or new features that have not been tested in your environment.
127126
- xref:reference:k-crd.adoc#k8s-api-github-com-redpanda-data-redpanda-operator-api-redpanda-v1alpha2-redpandaclusterspec[`spec.clusterSpec`]: This is where you can override default values in the Redpanda Helm chart. Here, you mount the <<prerequisites, I/O configuration file>> to the Pods that run Redpanda. For other configuration details, see <<Production considerations>>.
127+
- `spec.clusterSpec.useFlux`: By default, the Redpanda Operator uses Flux controllers to deploy and manage the Redpanda resource. Set this to `false` to disable Flux and instead use the Redpanda Operator controllers.
128128
- `spec.clusterSpec.enterprise`: If you want to use enterprise features in Redpanda, uncomment this section and add the details of a Secret that stores your Enterprise Edition license key. For details, see xref:get-started:licenses.adoc[].
129129
- `spec.clusterSpec.statefulset`: Here, you mount the <<prerequisites, I/O configuration file>> to the Pods that run Redpanda. For other configuration details, see <<Production considerations>>.
130130

0 commit comments

Comments
 (0)