Follow this quickstart guide to deploy a containerized Hello World application on your OVHcloud Managed Kubernetes Service cluster, using the OVHcloud API.
In this guide, we are assuming you’re using the OVHcloud API to manage your Kubernetes cluster. If you are using a different method, like the OVHcloud Manager, please refer to the relevant documentation:
Before you begin
- You should have already created a cluster on the OVHcloud Managed Kubernetes service.
- You will also need the kubectl command-line tool. You can find the detailed installation instructions for this tool on Kubernetes’ official site.
This guide assumes you are familiar with the OVHcloud API. If you have never used it, you can find the basics here: First steps with the OVHcloud API.
The API Explorer
To simplify things, we are using the API Explorer, which allows us to explore, learn and interact with the API in an interactive way.
Log in to the API Explorer using your OVH NIC.
If you go to the Kubernetes section of the API Explorer, you will see the available endpoints:
List your OVHcloud Managed Kubernetes services
The GET cloud/project
API endpoint lists all the available cloud projects:
By calling it, you can view a list of your services names. Note down the ID of the service (project) you want to use. In this example, we will refer to it as serviceName
Getting your managed cluster information
The GET /cloud/project/{serviceName}/kube
API endpoint provides important information about your Managed Kubernetes cluster, including its status and URL.
Configuring the default settings for kubectl
Please refer to the Configuring kubectl on an OVHcloud Managed Kubernetes cluster documentation for this part of the process.
Add a worker node
The first element needed to deploy the Hello World application is a worker node in your cluster. To create this node, you can use the POST /cloud/project/{serviceName}/kube/{kubeId}/nodepool
endpoint, which will deploy a node for your cluster on the Public Cloud.
You will need to give it a flavorName
parameter, with the flavor of the instance you want to create. For this tutorial choose a general purpose node, like the b2-7
flavor.
The API will return you the new node information.
Verify your node is ready
You can use the GET /cloud/project/{serviceName}/kube/{kubeId}/node
entry point to list all your nodes. Look for the node you’ve just created, and verify the status is READY
. The node installation can take a minute, so feel free to take a small break, then try again until it’s ready.
Deploy your first application
You’re now ready to deploy your first application.
For more details about this process, you can refer to the deploying an application documentation.