Use these templates to create HDInsight Kafka and Spark clusters with the Enterprise Security Package (ESP) in peered VNETs. This assumes you have already set up Azure Active Directory Domain Services (AADDS) and have a managed identity (MI).
Use this template to create a VNET and peer it to the VNET that contains your Azure Active Directory Domain Services. This should be used twice to create a VNET for each of the 2 HDInisght clusters (Kafka and Spark)
Once you have created the 2 VNETs, use this template to peer them to each other.
Once the two VNETs are set up and peered, use this template to deploy an HDInsight Kafka cluster in one of the VNETs.
Finally, use this template to deploy an HDInsight Spark cluster in the other VNET.