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.

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.

  2. Create a Resource Group

    Create a resource group to manage your AKS cluster. Replace <resource-group-name> with your desired resource group name and <location> with your preferred Azure region (e.g., eastus):

    az group create --name <resource-group-name> --location <location>
  3. Enable Microsoft Compute Service

    Register the required resource provider:

    az provider register --namespace Microsoft.Compute
  4. 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

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

  5. Connect to the AKS Cluster

    Retrieve credentials to configure kubectl:

    az aks get-credentials --resource-group <resource-group-name> --name <cluster-name>

    Verify the connection to the cluster:

    kubectl get nodes

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
  2. 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):

      kubectl label nodes <node-name> node-type=generic-compute
    • Create a Namespace:

      Create a dedicated namespace for Hyperswitch. Replace <namespace> with your desired namespace name:

      kubectl create namespace <namespace>
  3. Install Hyperswitch

    Deploy Hyperswitch using Helm. Replace <release-name> with your desired release name and <namespace> with the namespace you created:

    helm install <release-name> hyperswitch/hyperswitch-stack -n <namespace>
  4. Verify Installation

    • Check Pod Status:

      Ensure all pods are in the Running state:

      kubectl get pods -n <namespace>
    • Check Helm Release:

      Verify the Helm release:

      helm list -n <namespace>

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

Accessing Services

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:

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>

Uninstall Hyperswitch & Delete AKS Cluster

To uninstall Hyperswitch:

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

To delete the AKS cluster completely:

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

By replacing placeholders like <resource-group-name>, <cluster-name>, <node-name>, <namespace>, and <release-name> with your preferred names.

Test a payment

Make a payment using our Demo App

Use the Hyperswitch Demo app and make a payment with test card.

Refer our postman collection to try out REST APIs

Last updated

Was this helpful?