---
title: Deploy HiveMQ Edge on Azure ARC-Enabled Kubernetes Cluster with GitOps
description: Learn how to deploy HiveMQ Edge using GitOps on an Azure Arc-enabled Kubernetes cluster for seamless IoT messaging management and enterprise scale.
date: 2025-05-15
published: 2025-05-15
author: Anthony Olazabal
tags:
  - Azure
  - Edge Computing
  - HiveMQ Edge
  - Kubernetes
source: https://www.hivemq.com/blog/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops
---

# Deploy HiveMQ Edge on Azure ARC-Enabled Kubernetes Cluster with GitOps

Deploying [HiveMQ Edge](/products/hivemq-edge) on a Kubernetes cluster represents a significant step forward for organizations looking to enhance their IoT messaging infrastructure. HiveMQ Edge is an industrial protocol gateway including a lightweight [MQTT broker ](/blog/mqtt-brokers-beginners-guide)designed specifically for edge computing environments, enabling efficient and reliable communication between IoT devices and the cloud.

By deploying HiveMQ Edge on Kubernetes, businesses can leverage the scalability, flexibility, and resilience of containerized environments to manage their IoT workloads more effectively. This approach not only simplifies the deployment and management of HiveMQ Edge but also ensures high availability and fault tolerance, critical for mission-critical IoT applications.

Integrating Azure Arc into this deployment further amplifies the benefits by extending Azure's management and governance capabilities to Kubernetes clusters, regardless of their location. Azure Arc enables organizations to manage their Kubernetes clusters seamlessly across on-premises, multi-cloud, and edge environments from a single control plane. This integration provides a unified management experience, allowing IT teams to apply consistent policies, monitor cluster health, and deploy configurations effortlessly.

In this blog post, we will explore the step-by-step process of deploying HiveMQ Edge on a Kubernetes cluster with Azure Arc, highlighting the advantages and best practices to help you optimize your IoT infrastructure.

## Prerequisites to Deploy HiveMQ Edge on Azure ARC

This walkthrough assumes you have the following prerequisites in place:

- You have a virtual machine running the latest version of Ubuntu Server.
- The virtual machine can connect to the Internet without any limitation (if you are using firewalls, you will need to open a specific network flow).
- You have a valid Azure subscription with Owner permissions.

## Preparing Kubernetes Cluster on Ubuntu Server

Assuming that you have a fresh installation of Ubuntu Server 24.04, you can use the following steps to deploy a single node cluster on it:

1. Install the K8s snap:

2) Bootstrap the cluster:

3. View the status of your installation:

4) The status will become ready only after CNI goes up.

5) Start using Kubernetes:

6. Export kubeconfig:

If you want to deploy more workers, you can follow the official documentation from Ubuntu:[ ](https://ubuntu.com/kubernetes/install)[](https://ubuntu.com/kubernetes/install)[.](https://ubuntu.com/kubernetes/install)

## Setting Up Your Azure Environment

Go to your[ ](https://portal.azure.com/)[Azure portal](https://portal.azure.com/) and create a new “*Resource Group*” in your favorite location. In this article, we use *SE-ARC-DEMO*.

![Setting Up Your Azure Environment](https://a.storyblok.com/f/243938/1999x534/0006ac4365/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-1.webp)

Inside the Resource Group, click on *Create* to access the marketplace. You can filter the rich catalog by filtering on “*ARC*” and publisher “*Microsoft*”.

![Setting Up Your Azure Environment](https://a.storyblok.com/f/243938/1999x921/aa0dded72b/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-2.webp)

As you can see, there are a bunch of available solutions under ARC. We focus today on Kubernetes - Azure ARC. Click on *Create* to access the next page.

![Setting Up Your Azure Environment](https://a.storyblok.com/f/243938/1999x1185/00fc805f81/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-3.webp)

As part of the integration, you need to fulfill a few prerequisites:

- **A new or existing Kubernetes cluster:** The cluster must use Kubernetes version 1.13 or later (including OpenShift 4.2 or later and other Kubernetes derivatives).
- **Access to ports 443 and 9418:** Make sure the cluster has access to these ports, and the required[ ](https://aka.ms/arc-enabled-k8-outbound-urls)[outbound URLs.](https://aka.ms/arc-enabled-k8-outbound-urls)
- **Connectivity method:** You can connect to the internet over a public endpoint, through a proxy server, or over a private endpoint. An Azure Arc Private link scope is required to connect over a private endpoint.
- **Azure CLI:** An Azure CLI script will be generated that you will run locally to connect your cluster. On Ubuntu or Debian, you can run the following command. (For other operating systems, go to[ ](https://aka.ms/learn-how-to-install-azure-cli)[Learn how to install the Azure CLI on your local machine](https://aka.ms/learn-how-to-install-azure-cli)[.](https://aka.ms/learn-how-to-install-azure-cli))
-

* **CLI Extensions setup:** Install the latest connectedk8s and k8s-configuration, k8s-extension, customlocation CLI extensions. In your existing k8s node, run the following commands to install the prerequisites:
*

- Monitor the deployment of the extension via the following commands:

* For the full instructions, go to[ ](https://aka.ms/arc-k8-connect-cluster)[Learn how to install these extensions](https://aka.ms/arc-k8-connect-cluster)[.](https://aka.ms/arc-k8-connect-cluster)
* **Kubeconfig file with cluster admin permissions:** The file should be accessible via your CLI tooling. If you followed this article from the beginning, you should have your config file under .kube/config in the main home folder of your user.

Once ready, click on “Next” to define your cluster settings.

![Defining a Kubenetes Cluster with Azure Arc](https://a.storyblok.com/f/243938/1648x1710/52c4a8b039/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-4.webp)

Attach the Subscription to a Resource group, give it a name, and select the region. On the connectivity side, pick the most relevant. In our demo, we pick the Public endpoint—in a real-world context, you might choose to go via Private endpoint to align with your company’s cybersecurity rules.

On the next page, you can set the value of some predefined Tags for your Kubernetes cluster. We leave it blank for this demo, but it’s better to fill it to help govern your resources.

![Setting the value of predefined Tags for your Kubernetes cluster on Azure Arc](https://a.storyblok.com/f/243938/1648x1592/3f1fb311eb/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-5.webp)

Once ready, you need to execute a little script generated by Azure in order to connect your Kubernetes cluster to Azure and attach it to the resource you’ve just created in the portal:

When you execute the script on the k8s node, you will be asked to authenticate in your browser in order to start the installation process. Once the execution is finalized, you can go back to your Azure portal and click *Next* in order to validate the connectivity.

![Validate the connectivity to add Kubernetes cluster with Azure Arc](https://a.storyblok.com/f/243938/1648x1592/b259dfed0c/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-6.webp)

Navigating back to your *Resource Group*, you should be able to see your newly attached K8s cluster.

![Newly attached K8s cluster on Microsoft Azure](https://a.storyblok.com/f/243938/1750x1050/67096ece81/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-7.webp)

You can now see all the details of the cluster.

![Newly attached K8s cluster on Microsoft Azure](https://a.storyblok.com/f/243938/1999x1023/d830eba6b1/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-8.webp)

In order to fully get access and manage your resources, you have a last step to go through: creating a service account on your K8s cluster and copying the access token.

Run the following commands to create a service account and get the token (if you are not using the Canonical Kubernetes version, you can remove the sudo k8s from all commands):

Apply the following manifest to generate the token:

Get the token:

Go to your cluster workloads and paste the token:

![Kubernetes Cluster on Microsoft Azure](https://a.storyblok.com/f/243938/1999x1251/b3957e2cda/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-9.webp)

If you didn’t make any mistakes, you should finally see your pods.

![Kubernetes Cluster Workloads on Microsoft Azure](https://a.storyblok.com/f/243938/1999x1156/e9ef5aae1a/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-10.webp)

## Deploy HiveMQ Edge with GitOps in Azure ARC

You can go to *Settings* > *GitOps* and then add a new configuration:

![Creating a GitOps Configuration on Microsoft Azure Arc](https://a.storyblok.com/f/243938/1999x1050/ba1794c74f/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-12.webp)

Then, configure the GitHub repository that will host the configuration which will be deployed on the remote K8s Cluster. In our case, that’s HiveMQ Edge.

![Creating a GitOps Configuration on Microsoft Azure Arc](https://a.storyblok.com/f/243938/1999x1050/a1b6e34483/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-11.webp)

You can configure *Kustomizations* if it is required by your project. We add one that will match HiveMQ Edge.

![Creating a GitOps Configuration on Microsoft Azure Arc](https://a.storyblok.com/f/243938/1999x1050/f34dcd0271/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-13.webp)

![Creating a GitOps Configuration on Microsoft Azure Arc](https://a.storyblok.com/f/243938/1999x1050/812e149fc9/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-14.webp)

Review and create your deployment:

![Creating a GitOps Configuration on Microsoft Azure Arc](https://a.storyblok.com/f/243938/1999x1050/e2ae0db2a7/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-15.webp)

Once finalized, you should be able to see the deployment:

![Creating a GitOps Configuration on Microsoft Azure Arc](https://a.storyblok.com/f/243938/1999x1050/d23a248af3/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-16.webp)

## Create Your Flux Deployment

You can use different techniques to create your Flux deployment, using the flux cli or building from scratch your manifests in your repository.

We will create our own manifest in order to easily understand how it works, but if you are more into CLI, you can read[ ](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/tutorial-use-gitops-flux2?tabs=azure-cli)[this article](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/tutorial-use-gitops-flux2?tabs=azure-cli) from Microsoft.

Start by cloning your GitHub repository to your local machine. If you need an example, you can view the [blog post repository](https://github.com/anthonyolazabal/blog-azure-arc-hivemq-edge)[. ](https://github.com/anthonyolazabal/blog-azure-arc-hivemq-edge)

Then create a first file called “`kustomization.yaml`” with the following content:

Add a second file called “`hivemq-edge-deployment.yaml`” with the following content:

Push your newly created files to your repository, wait around 5 minutes, and have a look at the Azure portal. Your GitOps configuration should become compliant.

![GitOps configuration](https://a.storyblok.com/f/243938/1999x1050/4afc2a4538/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-17.webp)

You can also have a look at the resources created under your namespace; you should see a deployment with one HiveMQ Edge instance.

![HiveMQ Edge Instance on Azure](https://a.storyblok.com/f/243938/1999x1050/63b70b7204/deploy-hivemq-edge-azure-arc-enabled-kubernetes-cluster-gitops-image-18.webp)

You can play with the files in order to add configurations, or use a dedicated container image with your own extensions, protocol adapters, or advanced configurations.

## Wrap-Up

Deploying HiveMQ Edge on a Kubernetes cluster with Azure Arc offers a robust solution for managing and scaling your MQTT-based IoT infrastructure. By leveraging Azure Arc, you can extend Azure management capabilities to your Kubernetes clusters, regardless of where they are hosted. This integration not only simplifies the management of your Kubernetes resources but also ensures that your HiveMQ Edge deployment is consistent, secure, and scalable. With Azure Arc, you can take advantage of Azure's monitoring, governance, and compliance features, making it easier to maintain a reliable and efficient IoT messaging platform.

In this blog post, we walked through the steps to deploy HiveMQ Edge on a Kubernetes cluster using Azure Arc. From setting up your Kubernetes environment to configuring HiveMQ Edge and integrating it with Azure Arc, each step was designed to ensure a seamless deployment process.

Whether you are looking to streamline your IoT infrastructure or improve your operational efficiency, deploying HiveMQ Edge on Kubernetes with Azure Arc is a strategic move that can drive significant value for your organization.

For manufacturing reference architectures that use HiveMQ on Azure, read our white paper, [MQTT-Based Manufacturing Reference Architectures Using HiveMQ on Azure](/resources/mqtt-based-manufacturing-reference-architecture-for-hivemq-on-azure).

Get HiveMQ Edge FREE
