Deploy on Azure Using Helm Charts

Prerequisites

Ensure the following tools are installed and configured:

1. Azure CLI

The Azure Command-Line Interface (CLI) is a cross-platform tool that allows you to manage Azure resources. To install please visit the official Microsoft documentation.

Before setting up AKS, you'll need to create an Azure account. Simply follow the on-screen instructions. Note that billing information will be required during the sign-up process.

2. kubectl

kubectl is the command-line tool for interacting with Kubernetes clusters. To install kubectl please refer to the Kubernetes documentation.

3. Helm

Helm is a package manager for Kubernetes applications. To install please refer to helm documentation.

Part 1: Setting Up AKS

  1. Log In to Azure

Authenticate with your Azure account:

az login

Follow the browser prompts to log in.

  1. Create a Resource Group

Before provisioning your AKS cluster, create a resource group to organize and manage related resources.

Use the following command, replacing <resource-group-name> with your desired name and <location> with your preferred Azure region (e.g., eastus):

az group create --name <resource-group-name> --location <location>

Example:

az group create --name myAKSResourceGroup --location eastus

This will create a new resource group named myAKSResourceGroup in the eastus region.

  1. Enable the Microsoft.Compute Resource Provider

To use AKS, you must register the Microsoft.Compute resource provider:

az provider register --namespace Microsoft.Compute

If the registration state shows "Registering", wait a few minutes for it to complete. You can check the current state with:

az provider show --namespace Microsoft.Compute --query "registrationState"

Proceed once the status returns "Registered".

  1. Register the Operational Insights Resource Provider

To enable monitoring features in AKS, register the Microsoft.OperationalInsights provider:

az provider register --namespace Microsoft.OperationalInsights

You can check the registration status with:

az provider show --namespace Microsoft.OperationalInsights --query "registrationState"

Wait until the status shows "Registered" before proceeding.

  1. Register the Microsoft.ContainerService Provider

Before creating your AKS cluster, you must register the Microsoft.ContainerService resource provider, which is required to manage Kubernetes clusters in Azure.

Run the following command:

az provider register --namespace Microsoft.ContainerService

Then check the registration status:

az provider show --namespace Microsoft.ContainerService --query "registrationState"

Wait until the output returns:

"Registered"

Once it's registered, you can proceed with creating your AKS cluster.

  1. Create an AKS Cluster

Create an AKS cluster with your specified parameters. Replace <resource-group-name> with your resource group name, <cluster-name> with your desired AKS cluster name, and adjust other parameters as needed:

az aks create --resource-group <resource-group-name> \
    --name <cluster-name> \
    --node-count 1 \
    --node-vm-size Standard_A4_v2 \
    --enable-managed-identity \
    --generate-ssh-keys

For example:

az aks create \
  --resource-group myAKSResourceGroup \
  --name myAKSCluster \
  --node-count 1 \
  --node-vm-size Standard_A4_v2 \
  --enable-managed-identity \
  --generate-ssh-keys

Note: The --generate-ssh-keys parameter will create SSH keys if they do not already exist.

  1. Connect to the AKS Cluster

Once your AKS cluster is created, you can connect to it using kubectl.

  1. Retrieve the cluster credentials:

This command configures your local kubectl context to interact with the AKS cluster:

az aks get-credentials --resource-group myAKSResourceGroup --name myAKSCluster
  1. Verify the connection:

Run the following to ensure you're connected and the node is active:

kubectl get nodes

You should see an output similar to the one below. Make sure to note the Name of your node. You’ll need it in Part 2

NAME                                STATUS   ROLES    AGE    VERSION
aks-nodepool1-40058682-vmss000000   Ready    <none>   3m6s   v1.31.8

You should see your AKS node listed in the output. If so, you're now connected and ready to deploy to your cluster!

Part 2: Deploy Hyperswitch Using Helm

  1. Add the Hyperswitch Helm Repository

helm repo add hyperswitch https://juspay.github.io/hyperswitch-helm

Update the repository to fetch the latest charts:

helm repo update
  1. Prepare the Kubernetes Cluster

  • Label the Node for Hyperswitch:

Replace <node-name> with the name of your node (use kubectl get nodes to find it). We saved the name on Part I, Step 7.

kubectl label nodes <node-name> node-type=generic-compute

For example:

kubectl label nodes aks-nodepool1-40058682-vmss000000 node-type=generic-compute
  • Create a Namespace:

Namespaces help organize and isolate resources within your Kubernetes cluster. To create a new namespace, use the following command:

kubectl create namespace <namespace>

Example:

kubectl create namespace hyperswitch

This creates a namespace called hyperswitch-dev where you can deploy and manage related workloads separately from other environments.

  1. Install Hyperswitch

Use Helm to deploy Hyperswitch into your Kubernetes cluster. Replace <release-name> with your chosen release name and <namespace> with the namespace you previously created:

helm install <release-name> hyperswitch/hyperswitch-stack -n <namespace>

Example:

helm install hyperswitch-dev hyperswitch/hyperswitch-stack -n hyperswitch

This command installs the Hyperswitch stack into the specified namespace, allowing you to manage and upgrade the deployment easily through Helm.

  1. Verify Installation

  • Check Pod Status:

Ensure all pods are in the Running state:

kubectl get pods -n <namespace>

Example:

kubectl get pods -n hyperswitch
  • Check Helm Release:

helm list -n <namespace>

Example:

helm list -n hyperswitch

That's it! Hyperswitch should be up and running on your Azure account 🎉

Expose Hyperswitch Services Locally

Use the following command for port-forwarding to access the services. Replace <namespace> with your namespace:

kubectl port-forward service/hyperswitch-server 8080:80 -n <namespace> > /dev/null 2>&1 & \
kubectl port-forward service/hyperswitch-control-center 9000:80 -n <namespace> > /dev/null 2>&1 & \
kubectl port-forward service/hyperswitch-web 9050:9050 -n <namespace> > /dev/null 2>&1 & \
kubectl port-forward service/<release-name>-grafana 3000:80 -n <namespace> > /dev/null 2>&1 & \
kubectl port-forward service/<release-name>-vector 3103:3103 -n <namespace> > /dev/null 2>&1 & \
kubectl port-forward service/mailhog 8025:8025 -n <namespace> > /dev/null 2>&1 &

Access the services at:

The quickest way to explore Hyperswitch is via the Control Center. You can create an account or sign in with your email:

A magic link will be sent to Mailhog. Click on the link in white:

Afterwards, you’ll be taken straight to the Control Center. If you're just taking things for a spin, feel free to skip authentication and start exploring right away.

Test a payment

Use can now use the Hyperswitch Control Center and make a payment with dummy card.

Refer our postman collection to try out REST APIs.

Explore Further

Once you are done with the test payment, you can explore more about these:

Uninstall Hyperswitch & Delete AKS Cluster

  1. Uninstall Hyperswitch:

helm uninstall <release-name> -n <namespace>

Example:

helm uninstall hyperswitch -n hyperswitch

  1. Delete the namespace:

kubectl delete namespace <namespace>

Example:

kubectl delete namespace hyperswitch

  1. Delete the AKS cluster completely:

az aks delete --name <cluster-name> --resource-group <resource-group> --yes --no-wai

Example:

az aks delete --resource-group myAKSResourceGroup --name myAKSCluster --yes

Troubleshooting

  • View Pod Logs:

    To view logs for a specific pod:

    kubectl logs <pod-name> -n <namespace>
  • View Events:

    To view events in the namespace:

    kubectl get events -n <namespace> --sort-by='.metadata.creationTimestamp'
  • Reinstall Chart:

    If issues persist, uninstall and reinstall Hyperswitch:

    helm uninstall <release-name> -n <namespace>
    helm install <release-name> hyperswitch/hyperswitch-stack -n <namespace>

Customization & Configuration

To customize Hyperswitch, clone the Helm chart repository and modify values.yaml:

git clone https://github.com/juspay/hyperswitch-helm.git

Update the values.yaml file inside hyperswitch-stack/ and apply changes with:

helm upgrade --install <release-name> hyperswitch/hyperswitch-stack -n <namespace>

Last updated

Was this helpful?