Deploying a NiFi instance in Kubernetes

With CFM Operator you can deploy NiFi clusters to your Kubernetes cluster.

You can deploy a NiFi cluster by creating a NiFi custom resource (CR) and deploying it to the Kubernetes cluster.

  • Ensure the CFM Operator has been installed and is running.

  • You have created a NiFi CR YAML file that complies with the documentation provided by Cloudera.

  1. Create the NiFi cluster namespace if it does not already exist.
    kubectl create namespace [***NIFI CLUSTER NAMESPACE***]

    Replace [***NIFI CLUSTER NAMESPACE***] with your desired namespace.

  2. Create an image pull secret.
    kubectl create secret docker-registry docker-pull-secret \
      --namespace [***CFM OPERATOR NAMESPACE***] \
      --docker-server container.repository.cloudera.com \
      --docker-username [***USERNAME***] \
      --docker-password [***PASSWORD***]
    

    Replace:

    • [***USERNAME***] and [***PASSWORD***] with your Cloudera credentials.

    • [***CFM OPERATOR NAMESPACE***] with the desired operator installation namespace, typically cfm-operator-system.

    For example:
    kubectl create secret docker-registry docker-pull-secret \
      --namespace cfm-operator-system \
      --docker-server container.repository.cloudera.com \
      --docker-username my-username \
      --docker-password my-password
  3. Apply your NiFi CR to the Kubernetes cluster.
    kubectl apply -f [***NIFI YAML PATH***] \
    --namespace [***NIFI CLUSTER NAMESPACE***]

    Replace

    • [***NIFI YAML PATH***] with the absolute or relative path to the NiFi yaml.

    • [***NIFI CLUSTER NAMESPACE***] with your desired namespace.