Configuring scaling
Learn about scaling NiFi clusters either manually or automatically, using HPA.
It is possible to manually scale up and down the NiFi cluster size by editing the
replicas
value in the deployment file and applying the changes. It is also
possible to specify an HPA to automatically scale the NiFi cluster (replica count) based on the
Kubernetes resources (CPU/memory).
To manually scale the cluster, simply edit the replicas field to your desired replica count.
For autoscaling, apply a Horizontal Pod Autoscaling (HPA) resource targeting the NiFi CR, as follows:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: nifi-hpa
spec:
maxReplicas: 3
minReplicas: 1
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 75
scaleTargetRef:
apiVersion: cfm.cloudera.com/v1alpha1
kind: Nifi
name: [***NIFI CLUSTER NAME***]