<img alt="" src="https://secure.insightful-enterprise-intelligence.com/783141.png" style="display:none;">

NVIDIA H100 SXMs On-Demand at $3.00/hour - Reserve from just $1.90/hour. Reserve here

Deploy 8 to 16,384 NVIDIA H100 SXM GPUs on the AI Supercloud. Learn More

|

Published on 5 Feb 2025

Setting Up Kubernetes Clusters on Hyperstack: Step-by-Step Guide

TABLE OF CONTENTS

updated

Updated: 11 Feb 2025

NVIDIA H100 SXM On-Demand

Sign up/Login
summary

In our latest tutorial, we explore how to create a Kubernetes cluster on Hyperstack with just a few simple steps. Kubernetes streamlines containerised application management, but setting up a cluster manually can be complex. Hyperstack simplifies this by offering on-demand Kubernetes for quick deployment with minimal effort. This guide covers prerequisites, API requests for cluster creation and status verification. 

nexgencloud__a1e71827-dbb8-41c2-b7bb-23c97b77be76 copy

Managing containerised applications at scale can be complex. From provisioning the right infrastructure to handling updates and ensuring smooth operation, setting up a Kubernetes cluster often requires significant time and expertise. Many developers and teams struggle with this complexity, delaying deployments and increasing operational overhead.

That’s where Kubernetes comes in. As the industry standard for container orchestration, Kubernetes automates deployment, scaling and management, so teams can focus on innovation rather than infrastructure. However, setting up and maintaining a cluster manually can still be daunting.

Hyperstack makes this process easy. By provisioning Kubernetes clusters on demand, you can quickly and efficiently deploy and manage your containerised applications. With a few parameters, like your Kubernetes version and node type, you can deploy a cluster easily. Our guide offers a step-by-step process for creating a Kubernetes cluster on Hyperstack.

Note: Hyperstack's on-demand Kubernetes is currently in beta testing.

What are Kubernetes Cluster?

A Kubernetes cluster is a group of interconnected machines that collaborate to run, manage, and scale containerised applications. It consists of a control plane, which orchestrates cluster operations, and multiple worker nodes, where applications are deployed and executed. The control plane manages scheduling, networking and automation for seamless operation. Kubernetes clusters enhance scalability, reliability, and fault tolerance, making them essential for modern cloud-native workloads. By distributing workloads efficiently, they optimise resource utilisation and minimise downtime. 

What are the Benefits of Kubernetes Clusters?

Kubernetes clusters offer several key benefits for managing containerised applications:

  • Scalability: Kubernetes automatically scales applications up or down based on demand, ensuring optimal resource usage.
  • High Availability: By distributing workloads across multiple nodes, Kubernetes ensures that applications remain operational even if some components fail.
  • Portability: As an open-source platform, Kubernetes can be deployed across various environments, including on-premises, public clouds and hybrid setups for flexibility in infrastructure choices. 
  • Automated Management: It simplifies deployment, updates and rollbacks reducing manual intervention and operational risks.
  • Resource Efficiency: Kubernetes optimises infrastructure usage, balancing workloads to improve performance and reduce costs.

Coming Soon: Hyperstack's on-demand Kubernetes will offer scaling of worker nodes as an upcoming feature.

Prerequisites

Before deploying a Kubernetes cluster on Hyperstack, you will need to have a Hyperstack account. Follow the below steps to get started if you are new to Hyperstack:

 

  1. Create a Hyperstack account: Visit https://console.hyperstack.cloud and log in to your Hyperstack account using your registered email and password to access the platform.

  2. Activate your account: Follow the instructions in the activation email to complete the setup and verify your account.

  3. Add credit: Add funds to your account to activate resource usage.

  4. Create an environment: Start by setting up your first environment on Hyperstack, selecting the configurations suited to your project needs

  5. Create an SSH key: Generate an SSH key pair for secure server access.

  6. Create an API key: Generate your API key in the dashboard to authenticate your API requests.

How to Create a Kubernetes Cluster​

Follow the below steps to create a Kubernetes Cluster on Hyperstack in easy steps:

1. Choose a supported Kubernetes cluster version​

GET: https://infrahub-api.nexgencloud.com/v1/core/clusters/versions​ 

To get the Kubernetes cluster versions supported by Hyperstack, use the 'List Kubernetes Versions' endpoint. This will provide a list of available versions, as demonstrated in the example request. Select the version you wish to use for your Kubernetes cluster.

Example Request


curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/clusters/versions" \

 -H "accept: application/json"\
 -H "api_key: YOUR API KEY"

Response 


{
  "status": true,
  "message": "Retrieved Cluster Versions.",
  "kubernetes_version": [
    "1.27.8",
    ...
  ]
}

Keep the supported Kubernetes version handy, as it will be needed in the following step to 'Create a Kubernetes cluster'.

2. Create a Kubernetes cluster​

POST: https://infrahub-api.nexgencloud.com/v1/core/clusters​

To set up a Kubernetes cluster, you must define its configuration by completing the request payload with the necessary fields. These fields include details such as:

  • Cluster name
  • Node type
  • Kubernetes version
  • Hardware setup
  • Other pertinent parameters

After populating the payload with the required information, submit the request to the /core/clusters API using the POST method to establish the Kubernetes clusters with the specified configuration.

Cluster creation can take 5-20 minutes. You can use the 'Check cluster status' API to monitor progress. If not ACTIVE after 30 minutes, remove and retry.

If you face an error due to a lack of permissions, follow these steps:

  1. Verify Account Role: Ensure your account has an assigned Role. Without the right permissions, certain actions cannot be performed.

  2. Admin Actions Needed: Only Admins can assign Roles. If you're not an Admin, request their assistance to:

    • Navigate to “My Organisation” in the Hyperstack WebUI.
    • Choose “Create a new User role,” give it a name (e.g., “Operator”)
    • Enable the 'policy:KubernetesPermissions' policy.
  3. Role Assignment:

    • In “My Organisation,” locate your account.
    • Click “Change Role” and assign the newly created “Operator” role to your account.

Example Request


curl -X POST "https://infrahub-api.nexgencloud.com/v1/core/clusters" \
  -H "accept: application/json"\
  -H "api_key: YOUR API KEY"\
  -H "content-type: application/json" \
  -d '{
    "name": "example-cluster",
    "environment_name": "example-environment",
    "keypair_name": "example-ssh-key",
    "image_name": "Ubuntu Server 22.04 LTS R535 CUDA 12.2",
    "kubernetes_version": "1.27.8",
    "master_flavor_name": "",
    "node_flavor_name": "n3-A100x1",
    "node_count": 3
  }'

Response 


{
  "status": true,
  "message": "Success",
  "cluster": {
    "id": 1,
    "name": "example-cluster",
    "environment_name": "example-environment",
    "kubernetes_version": "1.27.8",
    "api_address": "",
    "kube_config": "",
    "status": "CREATING",
    "status_reason": String,
    "node_count": 3,
    "node_flavor": {
        "name": "n3-A100x1",
        "cpu": 28,
        "ram": 120.0,
        "disk": 100,
        "ephemeral": 750,
        "gpu": "A100-80G-PCIe",
        "gpu_count": 1
    },
    "node_addresses": [""],
    "keypair_name": "example-ssh-key",
    "created_at": "2024-06-17T09:33:46",
  }
} 

Save the cluster-ID returned, as it will be used in the next step to 'Check cluster status'.

3. Check cluster status​

GET: https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}​

The final step in deploying a cluster is to verify that it is ACTIVE and ready for use. To check its status, use the 'Retrieve Cluster Details' API, which offers information about the deployed cluster including a status field that shows its operational state. Send a request to the /core/clusters/{id} API using the GET method, substituting {id} in the path with the cluster-ID obtained in the previous step.

Example Request


curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}" \
  -H "accept: application/json"\
  -H "api_key: YOUR API KEY"

Response 


{
  "status": true,
  "message": "Success",
  "cluster": {
    "id": 1,
    "name": "example-cluster",
    "environment_name": "example-environment",
    "kubernetes_version": "1.27.8",
    "kube_config": "",
    "status": "ACTIVE",
    "status_reason": String,
    "node_count": 3,
    "node_flavor": {
        "name": "n3-A100x1",
        "cpu": 28,
        "ram": 120.0,
        "disk": 100,
        "ephemeral": 750,
        "gpu": "A100-80G-PCIe",
        "gpu_count": 1
    },
    "node_addresses": [""],
    "keypair_name": "example-ssh-key",
    "created_at": "2024-06-17T09:33:46",
  }
}

An ACTIVE status in the response above shows that your cluster has been successfully deployed and is ready for use.

How to Delete a Kubernetes Cluster?

DELETE: https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}

To remove a cluster, replace the placeholder {id} with the cluster's ID in the path. Be aware that deleting a cluster will erase all associated data, including nodes, configurations, and other resources. This action cannot be undone.

Example Request


curl -X DELETE "https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}" \
  -H "accept: application/json"\
  -H "api_key: YOUR API KEY"

Response


{
     "status": true,
     "message": "Success"
}  

Conclusion

Managing containerised applications at scale can be challenging but Kubernetes simplifies deployment, scaling and automation. With Hyperstack’s on-demand Kubernetes, users can quickly create clusters with just a few parameters, reducing complexity and operational overhead. While in beta testing, Hyperstack’s on-demand Kubernetes will offer exciting upcoming features like automatic infrastructure scaling so you can handle AI workloads and large-scale applications with ease. 

Explore More on Kubernetes:

FAQs

What is a Kubernetes cluster?

A Kubernetes cluster is a group of interconnected machines that manage and scale containerised applications efficiently.

How long does it take to create a Kubernetes cluster on Hyperstack?

Cluster creation on Hyperstack typically takes 5-20 minutes, but it may take up to 30 minutes in some cases.

What configurations do I need to specify for cluster creation?

You need to define parameters such as cluster name, node type, Kubernetes version and hardware setup.

How do I check if my Kubernetes cluster is ready?

You can use the 'Retrieve Cluster Details' API to check the cluster’s status. It should display ACTIVE when fully deployed.

Is auto-scaling available for on-demand Kubernetes on Hyperstack?

Hyperstack does not currently support auto-scaling. However, we are actively developing a manual scaling feature that will be available soon.

Subscribe to Hyperstack!

Enter your email to get updates to your inbox every week

Get Started

Ready to build the next big thing in AI?

Sign up now
Talk to an expert

Share On Social Media

12 Feb 2025

What is Zyphra Zonos? Zyphra Zonos is a text-to-speech (TTS) model suite developed by ...

10 Feb 2025

DeepSeek-R1 is making waves as a powerful open-source AI model with 671B parameters in ...

6 Feb 2025

What is DeepSeek-R1? DeepSeek-R1 is a 671B parameter Mixture-of-Experts open source ...