|
5 | 5 | :env-kubernetes: true |
6 | 6 | :page-categories: Deployment, GitOps |
7 | 7 |
|
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: |
10 | 9 |
|
11 | 10 | * High availability |
12 | 11 | * Disaster recovery |
13 | 12 | * Scalability |
14 | 13 |
|
15 | | -== Redpanda Helm chart vs Redpanda Operator |
| 14 | +== Deployment tools |
16 | 15 |
|
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. |
18 | 17 |
|
19 | 18 | |=== |
20 | | -| Feature | Helm | Helm + Redpanda Operator |
| 19 | +| Feature | Helm | Redpanda Operator |
21 | 20 |
|
22 | 21 | | *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. |
25 | 24 |
|
26 | 25 | | *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. |
29 | 28 |
|
30 | 29 | | *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. |
33 | 32 | |=== |
34 | 33 |
|
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]. |
36 | 35 |
|
37 | 36 | === Helm |
38 | 37 |
|
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. |
40 | 39 |
|
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: |
42 | 41 |
|
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 |
46 | 45 |
|
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. |
48 | 46 |
|
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 |
50 | 49 |
|
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: |
52 | 51 |
|
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. |
54 | 58 |
|
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. |
56 | 67 |
|
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: |
60 | 69 |
|
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 | +---- |
64 | 80 |
|
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.] |
66 | 82 |
|
67 | | -== Managed vs bare-metal |
| 83 | +== Kubernetes deployment environments |
68 | 84 |
|
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. |
70 | 86 |
|
71 | 87 | === Managed Kubernetes |
72 | 88 |
|
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: |
76 | 90 |
|
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. |
80 | 94 |
|
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. |
82 | 96 |
|
83 | 97 | === Bare-metal Kubernetes environments |
84 | 98 |
|
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: |
86 | 100 |
|
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. |
90 | 104 |
|
91 | 105 | == Documentation conventions |
92 | 106 |
|
93 | | -The Kubernetes documentation follows these conventions: |
| 107 | +This documentation follows conventions to help users easily identify Kubernetes resource types and Helm values: |
94 | 108 |
|
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. |
97 | 111 |
|
98 | 112 | == Next steps |
99 | 113 |
|
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: |
101 | 115 |
|
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) |
106 | 120 |
|
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. |
108 | 122 |
|
109 | 123 | include::shared:partial$suggested-reading.adoc[] |
110 | 124 |
|
|
0 commit comments