Deploy on GCP Using Helm Charts

Note: This tutorial deploys the full Hyperswitch stack, launching multiple services that may exceed compute limits on smaller clusters.

Part 1: Setting Up a Kubernetes Cluster on GCP

Step 1: Set Up GCP Account and Enable Kubernetes Engine API

  1. Sign In to Google Cloud Console:

  1. Create a Project:

  • Open your project picker:

  • Click New Project:

  • Provide a project name, and click Create:

If you are using an existing project, note the project ID for later use.

  1. Enable Kubernetes Engine API:

  • Navigate to APIs & Services > Library or search for it:

  • Search for Kubernetes Engine API and click Enable:

You'll need to provide billing information in order to proceed further. Follow the necessary steps and ensure the Kubernetes Engine API is enabled.

Step 2: Install Required Tools

  1. Google Cloud CLI (gcloud)

The Google Cloud Command-Line Interface (CLI) is a cross-platform tool that allows you to manage GCP resources. To install gcloud, please refer to the official Google Cloud SDK installation guide.

  1. kubectl

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

Ensure you only have 1 version of kubectl installed to avoid enviornmental conflict.

  1. Helm

Helm is a package manager for Kubernetes applications. To install Helm, please refer to the official Helm documentation.

Step 3: Create a Kubernetes Cluster

  1. Create the Cluster:

  • Run the following command to create a Kubernetes cluster:

Replace:

  • <CLUSTER_NAME>: A unique name for your cluster.

  • <ZONE>: The GCP zone (e.g., us-central1-a).

  • <NUMBER_OF_NODES>: Number of nodes in your cluster.

  • e2-standard-4: Machine type with 4 CPUs and 16GB RAM per node.

Example:

Choose a --zone that's near you

  1. Verify the Cluster:

  • Fetch cluster credentials to allow kubectl to interact with it:

  • Confirm the nodes are ready:

Part 2: Deploy Hyperswitch on Kubernetes Using Helm

Step 1: Add and Update the Hyperswitch Helm Repository

  1. Add the Hyperswitch Helm repository:

  1. Update Helm repository to fetch the latest charts:

Step 2: Prepare the Kubernetes Cluster

  1. Label Kubernetes Nodes: Ensure nodes meet the minimum requirements: 4 CPUs and 6GB memory.

  • Label your nodes:

  • List nodes to confirm labels:

  1. Create a Namespace:

  • Create a dedicated namespace for Hyperswitch:

Step 3: Install Hyperswitch

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

  1. Verify the Deployment:

  • Check the status of all deployed pods:

  • Ensure all pods are in the Running state.

Expose Hyperswitch Services Locally

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

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.

Troubleshooting

  • View Pod Logs: To check logs for a specific pod in Google Kubernetes Engine (GKE):

  • View Events: To list events in the namespace sorted by creation time:

  • Deploy Hyperswitch Helm Chart on GKE: If deploying for the first time or reinstalling, run:

Customization & Configuration

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

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

Uninstall Hyperswitch & Delete GKE Cluster

  • To uninstall Hyperswitch:

  • To delete the GKE cluster completely:

Explore Further

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

Last updated

Was this helpful?