Deploying a NiFi instance in a Kubernetes cluser

With Cloudera Flow Management - Kubernetes Operator you can deploy NiFi instances 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 Cloudera Flow Management - Kubernetes 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 a namespace for the NiFi cluster if it does not already exist.
    $ kubectl create namespace my-nifi
  2. In [***NIFI CLUSTER NAMESPACE***], create an image pull secret to access the installation artifacts.
    kubectl create secret docker-registry [***SECRET NAME***] \
      --namespace [***NIFI CLUSTER NAMESPACE***] \
      --docker-server container.repository.cloudera.com \
      --docker-username [***USERNAME***] \
      --docker-password [***PASSWORD***]
    

    Replace:

    • [***SECRET NAME***] with the desired Kubernetes secret name.
    • [***NIFI CLUSTER NAMESPACE***] with the namespace you created.

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

    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. Deploy NiFi cluster to the Kubernetes cluster.
    kubectl apply -f [***CR YAML PATH***] --namespace [***NIFI CLUSTER NAMESPACE***]

    Replace:

    • [***CR YAML PATH***] with the absolute or relative path to the CR YAML file you created for NiFi cluster.

    • [***NIFI CLUSTER NAMESPACE***] with the namespace. you created to deploy NiFi cluster.