-
Notifications
You must be signed in to change notification settings - Fork 47
DOC-546 Document the new useFlux flag
#859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
2caf0c6
Update config for new beta
Deflaimun c3ffdd4
update with rpk 24.3.1-rc1 (#819)
Deflaimun 58e0bff
DOC-502 License enforcement updates (#813)
JakeSCahill 121d5f4
Properties 24 3 (#822)
Deflaimun 19c0ec1
Add User resource docs (#773)
JakeSCahill fce336b
Leader pinning (#809)
kbatuigas 3e93983
DOC-287 Mountable TS topics (#725)
kbatuigas 03d3e60
Update with latest rpk commands from v0.0.0-20241104git4a0f859 (#835)
Deflaimun 41bfe40
what's new in 24.3 beta (#811)
micheleRP afba214
Force-update fallback 24.3-rc2
Deflaimun 488c9f6
Michele rp patch 1 (#837)
micheleRP 67c90f5
DOC-470 Debug bundle in Redpanda Console (#825)
JakeSCahill 16e9cda
add Tombstone property (#847)
Deflaimun 58ded83
Tombstone retention (#829)
kbatuigas 0ce69bb
Document the new useFlux flag
JakeSCahill 2341b75
Apply suggestions from code review
JakeSCahill 6810594
Apply suggestions from code review
JakeSCahill f0272f3
Apply suggestions from code review
JakeSCahill 724f208
Apply suggestions from code review
JakeSCahill 1487dc2
Merge branch 'v-WIP/24.3' into DOC-546
JakeSCahill 7f6e748
Specify default
JakeSCahill 387277b
Merge branch 'v-WIP/24.3' into DOC-546
JakeSCahill d1bae7a
Update release notes
JakeSCahill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,106 +5,120 @@ | |
| :env-kubernetes: true | ||
| :page-categories: Deployment, GitOps | ||
|
|
||
| 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: | ||
| 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: | ||
|
|
||
| * High availability | ||
| * Disaster recovery | ||
| * Scalability | ||
|
|
||
| == Redpanda Helm chart vs Redpanda Operator | ||
| == Deployment tools | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
| |=== | ||
| | Feature | Helm | Helm + Redpanda Operator | ||
| | Feature | Helm | Redpanda Operator | ||
|
|
||
| | *Version management* | ||
| | Directly supported through Helm, enabling updates and rollbacks. | ||
| | Managed through Helm. | ||
| | Supported through Helm, enabling updates and rollbacks. | ||
| | Managed through Redpanda custom resources, with optional integration with Flux for GitOps workflows. | ||
|
|
||
| | *Multi-tenant Kubernetes clusters* | ||
| | Supported. Helm allows you to deploy multiple independent Redpanda clusters by defining different Helm release names. | ||
| | Supported. The Redpanda Operator enables a more declarative approach for managing multi-tenant clusters using the RedpandaList custom resource. | ||
| | Supported. Helm allows deployment of multiple independent Redpanda clusters by defining different Helm release names. | ||
| | Supported. The Redpanda Operator provides a declarative approach for managing multi-tenant clusters using the RedpandaList custom resource. | ||
|
|
||
| | *Dependency and configuration management* | ||
| | Managed directly through the Redpanda Helm chart. | ||
| | Configurations defined in custom resources are passed to Helm, which then manages the dependencies and configurations. | ||
| | Managed through the Redpanda Helm chart. | ||
| | Configurations are defined in custom resources. | ||
| |=== | ||
|
|
||
| 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]. | ||
| 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]. | ||
|
|
||
| === 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. | ||
| 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. | ||
|
|
||
| The Redpanda Helm chart generates and applies all the manifest files you need for deploying Redpanda in Kubernetes, including: | ||
| The Redpanda Helm chart provides all the manifest files required to deploy Redpanda in Kubernetes, including: | ||
|
|
||
| - The StatefulSet to manage the Redpanda brokers. | ||
| - A Headless ClusterIP Service for internal communication with the Redpanda cluster. | ||
| - A NodePort Service for external communication with the Redpanda cluster. | ||
| - A StatefulSet to manage Redpanda brokers | ||
| - A Headless ClusterIP Service for internal communication with the Redpanda cluster | ||
| - A NodePort Service for external communication with the Redpanda cluster | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
| [[helm-and-redpanda-operator]] | ||
| === Redpanda Operator | ||
|
|
||
| === Helm and Redpanda Operator | ||
| The Redpanda Operator provides two deployment modes controlled by the `useFlux` flag. The modes differ in how reconciliation is handled: | ||
|
|
||
| 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. | ||
| - *Flux-managed mode (`useFlux: true`)*: | ||
| 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: | ||
| + | ||
| . The Redpanda Operator defines the necessary CRDs for Redpanda. A Redpanda resource represents a Redpanda cluster, configured through the Redpanda Helm chart values. | ||
JakeSCahill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| . When the Redpanda Operator detects changes to Redpanda resources, it triggers Flux to reconcile the corresponding HelmRelease resource. | ||
| . Flux uses the HelmRelease resource to manage the lifecycle of the Redpanda Helm chart, applying updates as needed. | ||
|
|
||
| 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). | ||
| - *Redpanda-managed mode (`useFlux: false`)*: | ||
| When `useFlux` is set to `false`, the Redpanda Operator manages and reconciles Redpanda resources directly, without involving Flux. This mode works as follows: | ||
| + | ||
| . The Redpanda Operator creates both `HelmRelease` and `HelmRepository` resources but suspends them, keeping Flux inactive. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be worth calling out that despite the existence of this flag, the operator still requires the Flux CRDs to be installed. Phrased in a way that indicates we intend to change that soon :) |
||
| + | ||
| NOTE: Although these resources are created in a suspended state, the operator still requires the Flux CRDs to be installed. | ||
| . The operator directly reconciles Redpanda resources, performing tasks such as installations, updates, and cleanup, normally handled by Flux. | ||
| . If `useFlux` is later re-enabled, the operator unsuspends the Flux resources, and Flux resumes lifecycle management. | ||
|
|
||
| image::shared:operator-flux-relationship.png[CRDs for the Redpanda Operator include Flux CRDs. Flux manages the Redpanda Helm chart through the HelmRelease resource.] | ||
|
|
||
| Here's how it works with Flux: | ||
| Example configuration to specify the deployment mode in Redpanda's custom resource: | ||
|
|
||
| . 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. | ||
| . When the Redpanda Operator detects changes to these Redpanda resources, it triggers Flux to reconcile the corresponding HelmRelease resource. | ||
| . Flux uses the HelmRelease resource to manage the lifecycle of the Redpanda Helm chart in the cluster. | ||
| [,yaml] | ||
| ---- | ||
| apiVersion: cluster.redpanda.com/v1alpha2 | ||
| kind: Redpanda | ||
| metadata: | ||
| name: redpanda | ||
| spec: | ||
| clusterSpec: | ||
| useFlux: true # or false, depending on your desired deployment mode | ||
| ---- | ||
|
|
||
| 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]. | ||
| image::shared:operator-flux-relationship.png[CRDs for the Redpanda Operator include Flux CRDs. Flux manages the Redpanda Helm chart through the HelmRelease resource.] | ||
|
|
||
| == Managed vs bare-metal | ||
| == Kubernetes deployment environments | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
| === Managed Kubernetes | ||
|
|
||
| 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). | ||
|
|
||
| Managed Kubernetes platforms provide the following benefits: | ||
| 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: | ||
|
|
||
| * *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. | ||
| * *Control plane maintenance*: The managed service provider maintains and updates the control plane software, ensuring that it remains secure, reliable, and up-to-date. | ||
| * *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. | ||
| * *Ease of deployment*: Pre-configured instances join your Kubernetes cluster automatically. | ||
| * *Control plane maintenance*: The provider maintains the control plane, ensuring security and reliability. | ||
| * *Health monitoring and repairs*: The provider monitors master nodes and repairs them as needed. | ||
|
|
||
| However, you are still responsible for deploying and maintaining your Redpanda instances on the worker nodes. | ||
| You remain responsible for deploying and maintaining Redpanda instances on worker nodes. | ||
|
|
||
| === Bare-metal Kubernetes environments | ||
|
|
||
| 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: | ||
| 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: | ||
|
|
||
| * *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. | ||
| * *Custom configuration*: Bare-metal allows for granular control over the Kubernetes configuration, meaning you can fine-tune the environment. | ||
| * *Cost efficiency*: Owning and operating your own hardware may prove to be more cost-effective. | ||
| * *Complete control*: Bare-metal Kubernetes offers control over every aspect of deployment, suited for highly customized environments. | ||
| * *Custom configurations*: You have granular control to fine-tune the Kubernetes setup. | ||
| * *Cost efficiency*: Owning and operating your hardware may be more economical over time. | ||
|
|
||
| == Documentation conventions | ||
|
|
||
| The Kubernetes documentation follows these conventions: | ||
| This documentation follows conventions to help users easily identify Kubernetes resource types and Helm values: | ||
|
|
||
| * 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. | ||
| * Helm values: Helm values, such as `storage.persistentVolume.enabled`, are rendered in monospace font and written according to the JSON path specification. | ||
| * *Resource names*: Kubernetes resource names, such as Service or PersistentVolume, are capitalized and in Pascal case to match the manifest files. | ||
| * *Helm values*: Helm values, like `storage.persistentVolume.enabled`, are displayed in monospace font. | ||
|
|
||
| == Next steps | ||
|
|
||
| Whether you're deploying locally or in the cloud, choose one of the following guides to get you started: | ||
| Whether you're deploying locally or in the cloud, choose one of the following guides to get started: | ||
|
|
||
| * xref:./local-guide.adoc[Local] (kind and minikube) | ||
| * xref:./aks-guide.adoc[Azure Kubernetes Service] (AKS) | ||
| * xref:./eks-guide.adoc[Elastic Kubernetes Service] (EKS) | ||
| * xref:./gke-guide.adoc[Google Kubernetes Engine] (GKE) | ||
| * xref:./local-guide.adoc[Local Deployment Guide] (kind and minikube) | ||
| * xref:./aks-guide.adoc[Azure Kubernetes Service Guide] (AKS) | ||
| * xref:./eks-guide.adoc[Elastic Kubernetes Service Guide] (EKS) | ||
| * xref:./gke-guide.adoc[Google Kubernetes Engine Guide] (GKE) | ||
|
|
||
| Or, you can explore our xref:./k-production-workflow.adoc[production workflow] to learn more about the requirements and best practices. | ||
| Or, explore our xref:./k-production-workflow.adoc[production workflow] to learn about requirements and best practices. | ||
|
|
||
| include::shared:partial$suggested-reading.adoc[] | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to best phrase this but
useFluxis an optional boolean. Meaning there are 3 states: true, false, null.If
useFluxis explicitly set totrueorfalseit will be interpreted as that value.If
useFluxisnulleither explicitly or not set[^1], it will be interpreted as the value of a CLI flag (Let's call it--use-flux-defaultbut the name is TBD) that Rafal is in the process of adding. The flag will default totrue, meaning thatuseFlux: nullwill be interpreted astruefor "standard" installations of the operator.We can omit documenting the CLI flag for now but I wanted to make sure that you're aware of it.
The weird dance of value interpretation is so we can avoid impacting the experience of existing users at the initial release and later switch the default to
falsefollowed be the official removal of this flag and flux in its entirety.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Chris. I'll keep this in mind when we come to doc the new CLI flag.