If you have a single node (usually in dev environment), you don't need replicas as you won't be able to assign them, so you can set index.number_of_replicas to 0 in your index settings when creating your index.
However, in production, you might want some redundancy, hence you usually provision more than one data nodes and the replicas shards will be properly assigned.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.