NiFi flow not able to write into Elasticsearch because of exceeding maximum shards

If I remember correctly it does take replicas into account even if they can never be allocated. Making that change will not hurt anyway and may resolve the issue.