Install Confluent Manager for Apache Flink with Helm¶
This topic walks you through how to install Confluent Manager for Apache Flink (CMF) with Helm.
Step 1: Confirm prerequisites¶
Confirm you have adequate hardware.
The underlying processor architecture of your Kubernetes worker nodes must be a supported version for the Confluent Platform for Apache Flink version you plan to deploy.
Currently, Confluent Platform for Apache Flink supports x86 and ARM64 hardware architecture.
Component Nodes Storage Memory CPU Confluent Manager for Apache Flink 1 10 GB (persistent storage as PVC) [1] 1 GB RAM [1] 2 [1] Flink Kubernetes Operator [2] 1 N/A 3 GB RAM 2 [2] These resource requirements are calculated to support the execution of 200 Flink applications.
Install the required tools.
This installation guide assumes you have already installed Helm. CMF supports Helm 3 for installation. You should have already configured Helm using the Helm documentation. To verify that your environment is prepared, the following commands should complete without error:
kubectl get pods helm list
Add the Confluent Platform for Apache Flink Helm repository.
helm repo add confluentinc https://packages.confluent.io/helm helm repo update
Step 2: Install the Confluent Platform for Apache Flink Kubernetes operator¶
You must install the Confluent Platform for Apache Flink Kubernetes operator before you install CMF because CMF uses the operator to manage the Flink clusters.
Install the certificate manager.
kubectl create -f https://github.com/jetstack/cert-manager/releases/download/v1.8.2/cert-manager.yaml
Install the Flink Kubernetes operator.
Use the
watchNamespaces
configuration to prepare the Kubernetes namespaces you want to deploy Flink applications to. You can later upgrade the Flink Kubernetes operator to extend the list, by re-running below Helm command again, with the additional namespaces. Note that you need to manually restart the Flink Kubernetes operator after changing thewatchNamespaces
configuration, for example by deleting the operator pod. It will be automatically recreated. You must ensure that the Kubernetes operator watches the Kubernetes namespaces you want to deploy Flink applications to with CMF.Instead of using Helm, you can also manually prepare a Kubernetes namespace for deploying Flink clusters, by creating the necessary
flink
service account, role and role binding, as documented in the the Flink Kubernetes operator documentation. If you omit thewatchNamespaces
flag, the operator will watch all namespaces, but the necessaryflink
service account will only by created in the namespace where the operator is installed. Additional namespaces must be setup manually.helm upgrade --install cp-flink-kubernetes-operator \ confluentinc/flink-kubernetes-operator \ --set watchNamespaces="{namespace1,namespace2,...}"
Step 3: Deploy CMF from the Confluent Helm repository¶
Next you will install CMF using the Confluent-provided Helm chart. This Helm chart is the only supported way to install and update CMF. Out-of-band updates to the resources that the Helm chart creates are not supported.
Warning
If you do not specify a license, CMF will generate a trial license.
Store your Confluent license in a Kubernetes secret.
kubectl create secret generic <license-secret-name> --from-file=license.txt
Install CMF using the default configuration:
helm upgrade --install cmf \ confluentinc/confluent-manager-for-apache-flink \ --namespace <namespace> \ --set license.secretRef=<license-secret-name>
Note
CMF will create a
PersistentVolumeClaim
(PVC) in Kubernetes. If the PVC remains in statusPending
, check your Kubernetes cluster configuration and make sure a Container Storage Interface (CSI) driver is installed and configured correctly. Alternatively, if you want to run CMF without persistent storage, you can disable the PVC by setting thepersistence.create
property tofalse
. Note that in this case, a restart of the CMF pod will lead to a data loss.Configure the Chart. Helm provides several options for setting and overriding values in a chart. For CMF, you should customize the chart by passing a values file with the
--values
flag.First, use Helm to show the default
values.yaml
file for CMF.helm inspect values --version 1.0.3 confluentinc/confluent-manager-for-apache-flink
Note the following about CMF default values:
CMF uses SQLite to store metadata about your deployments. The data is persisted on a persistent volume that is created during the installation via a
PersistentVolumeClaim
created by Helm.The persistent volume is created with your Kubernetes cluster’s default storage class. Depending on your storage class, your metadata might not be retained if you uninstall CMF. For example, if your reclaim policy is
Delete
, data is not retained. Make sure to backup the data in the persistent volume regularly.If you want to set your storage class, you can overwrite
persistence.storageClassName
during the installation.By default, the chart uses the image hosted by Confluent on DockerHub. To specify your own registry, set the following configuration values:
image: repository: <image-registry> name: cp-cmf pullPolicy: IfNotPresent tag: <tag>
By default, the chart creates a cluster role and service account that CMF can use to create and monitor Flink applications in all namespaces. If you want to keep your service account, you set the
serviceAccount.name
property during installation to the preferred service account.
Step 4: Cleanup¶
For cleanup instructions, see the cleanup section in the quickstart guide.