Preview k8s cluster price
curl --request POST \
--url https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pools": [
{
"flavor_id": "g0-standard-1-2",
"node_count": 1
}
]
}
'import requests
url = "https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters"
payload = { "pools": [
{
"flavor_id": "g0-standard-1-2",
"node_count": 1
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pools: [{flavor_id: 'g0-standard-1-2', node_count: 1}]})
};
fetch('https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pools' => [
[
'flavor_id' => 'g0-standard-1-2',
'node_count' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters"
payload := strings.NewReader("{\n \"pools\": [\n {\n \"flavor_id\": \"g0-standard-1-2\",\n \"node_count\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pools\": [\n {\n \"flavor_id\": \"g0-standard-1-2\",\n \"node_count\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pools\": [\n {\n \"flavor_id\": \"g0-standard-1-2\",\n \"node_count\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"instances": [
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
],
"publicips": [
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
],
"total_price": {
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
},
"volumes": [
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
]
}Managed Kubernetes
Preview k8s cluster price
Preview the billing price for a cluster based on the provided configuration.
POST
/
cloud
/
v2
/
pricing
/
{project_id}
/
{region_id}
/
k8s
/
clusters
Preview k8s cluster price
curl --request POST \
--url https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"pools": [
{
"flavor_id": "g0-standard-1-2",
"node_count": 1
}
]
}
'import requests
url = "https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters"
payload = { "pools": [
{
"flavor_id": "g0-standard-1-2",
"node_count": 1
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pools: [{flavor_id: 'g0-standard-1-2', node_count: 1}]})
};
fetch('https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pools' => [
[
'flavor_id' => 'g0-standard-1-2',
'node_count' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters"
payload := strings.NewReader("{\n \"pools\": [\n {\n \"flavor_id\": \"g0-standard-1-2\",\n \"node_count\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pools\": [\n {\n \"flavor_id\": \"g0-standard-1-2\",\n \"node_count\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/k8s/clusters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pools\": [\n {\n \"flavor_id\": \"g0-standard-1-2\",\n \"node_count\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"instances": [
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
],
"publicips": [
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
],
"total_price": {
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
},
"volumes": [
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
]
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Path Parameters
Project ID
Example:
1
Region ID
Example:
1
Body
application/json
Cluster pools
Show child attributes
Show child attributes
Response
200 - application/json
OK
Pricing scheme for various resources
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response with prices per hour and per month
Show child attributes
Show child attributes
Example:
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8,
"tax_percent": 17
}
Show child attributes
Show child attributes
Was this page helpful?
⌘I