Deploy Confluent for Kubernetes

The Confluent for Kubernetes (CFK) bundle contains Helm charts, templates, and scripts for deploying Confluent Platform to your Kubernetes cluster.

You can deploy CFK using one of the following methods:

You can install the optional Confluent plugin for interacting with CFK using one of the following methods:

Deploy Confluent for Kubernetes from Helm repo

  1. Add a Helm repo:

    helm repo add confluentinc https://packages.confluent.io/helm \
      --namespace <namespace>
    
    helm repo update --namespace <namespace>
    
  2. Install CFK using the default configuration:

    helm upgrade --install confluent-operator \
      confluentinc/confluent-for-kubernetes \
      --namespace <namespace>
    

Deploy Confluent for Kubernetes using the download bundle

  1. Download and unpack the following CFK bundle:

    https://confluent-for-kubernetes.s3-us-west-1.amazonaws.com/confluent-for-kubernetes-2.0.0.tar.gz

  2. From the helm sub-directory of where you downloaded the CFK bundle, install CFK:

    helm upgrade --install confluent-operator \
      ./confluent-for-kubernetes \
      --namespace <namespace>
    

Deploy customized Confluent for Kubernetes

You can deploy Confluent for Kubernetes (CFK) with custom configurations either using the CFK values.yaml file or using the helm upgrade command.

To deploy customized Confluent for Kubernetes using the CFK values.yaml file:
  1. Get the values.yaml file:

    • If you are using Helm repo to deploy CFK, pull the CFK Chart:

      mkdir -p <CFK-home>
      
      helm pull confluentinc/confluent-for-kubernetes \
        --untar \
        --untardir=<CFK-home> \
        --namespace <namespace>
      

      The values.yaml file is in the <CFK-home>/confluent-for-kubernetes directory.

    • If you are using a download bundle to deploy CFK, the values.yaml file is in the helm/confluent-for-kubernetes directory under where you downloaded the bundle.

  2. Edit the values.yaml file to customize CFK configuration.

  3. Install CFK using the customized configuration:

    helm upgrade --install confluent-operator \
      confluentinc/confluent-for-kubernetes \
      --values <path-to-values-file> \
      --namespace <namespace>
    
To deploy customized Confluent for Kubernetes with the helm upgrade command:

Specify the configuration options using the --set flag:

helm upgrade --install confluent-operator \
  confluentinc/confluent-for-kubernetes \
  --set <setting1>=<value1> \
  --set <setting2>=<value2> \
  ...
  --namespace <namespace>

Deploy Confluent for Kubernetes with namespaced scope

To deploy CFK in a namespace, add --set namespace=true to the install command:

helm upgrade --install confluent-operator \
  confluentinc/confluent-for-kubernetes \
  --set namespaced=true \
  --namespace <namespace>

Alternatively, you can update the values.yaml file as described above, and set the following property:

namespaced: true

Deploy Confluent for Kubernetes without permission for Kubernetes role binding

To deploy CFK as a user without the permission to create role/rolebinding, add --set rbac=false to the install command:

helm upgrade --install confluent-operator \
  confluentinc/confluent-for-kubernetes \
  --set rbac=false \
  --namespace <namespace>

Alternatively, you can update the values.yaml file as described above, and set the following property:

rbac: false

Deploy Confluent for Kubernetes with custom service account

To provide a custom service account to manange CFK, add --set serviceAccount.create=false --set serviceAccount.name=<name> --set rbac=false to the install command:

helm upgrade --install confluent-operator \
  confluentinc/confluent-for-kubernetes \
  --set serviceAccount.create=false \
  --set serviceAccount.name=<service-account-name> \
  --set rbac=false \
  --namespace <namespace>

Alternatively, you can update the values.yaml file as described above, and set the following property:

serviceAccount:
  create: false
  name: <service-account-name>
rbac: false

Install Confluent plugin

The Confluent for Kubernetes (CFK) bundle contains a Confluent plugin for interacting with Confluent for Kubernetes. It is supported for three environments: Linux, Windows, and Darwin. See Confluent plugin for more information about the tool.

  1. If you deployed CFK using Helm repo, download and unpack the CFK bundle. If you used Deploy Confluent for Kubernetes using the download bundle, skip this step.

    https://confluent-for-kubernetes.s3-us-west-1.amazonaws.com/confluent-for-kubernetes-2.0.0.tar.gz

  2. Unpack the kubectl plugin that matches your client environment, Linux, Windows or Mac OS (Darwin), into your client environment local executables directory. On Mac OS and Linux, this would be /usr/local/bin/. This will allow the standard CLI kubectl to find the plugin.

    tar -xvf kubectl-plugin/kubectl-confluent-<environment>-amd64.tar.gz \
       -C <local directory for the plugin>
    

    For example, on Mac OS:

    tar -xvf kubectl-plugin/kubectl-confluent-darwin-amd64.tar.gz \
       -C /usr/local/bin/
    

Install Confluent plugin using Krew

Krew is the plugin manager for kubectl. Take the following steps if you want to use Krew to install the Confluent plugin.

  1. Install Krew as described in Krew User Guide.

  2. Run the following command to install the Confluent plugin:

    kubectl krew  install \
      --manifest=confluent-platform.yaml \
      --archive=kubectl-confluent-<environment>-amd64.tar.gz
    

    For example, to install the plugin on MacOS:

    kubectl krew  install \
      --manifest=confluent-platform.yaml \
      --archive=kubectl-confluent-darwin-amd64.tar.gz