1. Packages
  2. Azure Classic
  3. How-to Guides
  4. Spark on Azure HDInsight

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Spark on Azure HDInsight

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

View Code Deploy this example with Pulumi

An example Pulumi component that deploys a Spark cluster on Azure HDInsight.

Running the App

  1. Create a new stack:

    pulumi stack init dev
    
    Copy
  2. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):

    az login
    
    Copy
  3. Restore NPM dependencies:

    npm install
    
    Copy
  4. Configure target Azure environment:

    pulumi config set azure:location <location>
    pulumi config set azure:subscriptionId <YOUR_SUBSCRIPTION_ID>
    pulumi config set username <value>
    pulumi config set password --secret <value>
    
    Copy
  5. Run pulumi up to preview and deploy changes:

    $ pulumi up
    Previewing changes:
    ...
    
    Performing changes:
    ...
    info: 5 changes performed:
        + 5 resources created
    Update duration: 15m6s
    
    Copy
  6. Check the deployed Spark endpoint:

    $ pulumi stack output endpoint
    https://myspark1234abcd.azurehdinsight.net/
    
    # For instance, Jupyter notebooks are available at https://myspark1234abcd.azurehdinsight.net/jupyter/
    # Follow https://docs.microsoft.com/en-us/azure/hdinsight/spark/apache-spark-load-data-run-query to test it out
    
    Copy

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi