← Back

Kubernetes

API for Kubernetes operations

Version: 0.1.0

Server

  • URL: https://api.kopernik.us/v0
    • Kopernik.us API server

Paths

/resource/kubernetes/{providerUid}

GET

List Kubernetes clusters

List Kubernetes clusters for the specified provider

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
nextToken query string Token for the next page of Kubernetes clusters, if there are more items to fetch
maxResults query integer Maximum number of Kubernetes clusters to fetch
jq query string JQ filter expression to filter the results. Only resources where the expression evaluates to a truthy value are included. The expression is applied to each resource’s JSON representation. Uses jq 1.7 syntax.

Responses:

POST

Create Kubernetes cluster

Create a new Kubernetes cluster for the specified provider

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider

Request Body:

Content Type: application/json

Schema: KubernetesClusterCreate

Responses:

/resource/kubernetes/{providerUid}/{resourceUid}

GET

Get Kubernetes cluster

Get Kubernetes cluster details

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
resourceUid path string Unique identifier of the Kubernetes cluster

Responses:

DELETE

Delete Kubernetes cluster

Delete Kubernetes cluster and all node pools by cluster UID

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
resourceUid path string Unique identifier of the Kubernetes cluster to delete

Responses:

  • 200: Kubernetes cluster deleted

  • 400: Argument validation error

  • 404: Kubernetes cluster not found

Schemas

KubernetesNodePool

Kubernetes node pool (or node group)

Type: object

Properties:

Name Type Required Description
uid string Unique identifier of the node pool
name string Name of the node pool
nodeCount integer Number of nodes in the node pool
machineType string Machine type used for nodes in this pool
tags array Tags of the node pool

KubernetesClusterCreate

Request to create a new Kubernetes cluster

Type: object

Properties:

Name Type Required Description
regionUid string Region identifier where the Kubernetes cluster will be created
name string Name of the Kubernetes cluster
version string Kubernetes version for the cluster
nodePools array List of node pools to create with the cluster
vpcUid string VPC identifier to associate the cluster with; Akamai: not supported, DigitalOcean: optional, AWS: required
vpcSubnetUids array VPC subnet identifiers for the cluster; Akamai: not supported, DigitalOcean: optional, AWS: required at least 2 subnets in different availability zones
role string IAM role ARN for the EKS cluster service role (AWS only)
tags array Tags for the Kubernetes cluster

KubernetesCluster

Kubernetes cluster

Composition: allOf

Type: object

Properties:

Name Type Required Description
name string Name of the Kubernetes cluster
version string Version of the Kubernetes
nodePools array<KubernetesNodePool> List of node pools (or node groups) associated with this cluster
vpcUid string ID of the VPC the Kubernetes cluster is associated with; empty for non-VPC clusters
tags array Tags of the Kubernetes cluster

KubernetesClusterResourceResponse

Response with Kubernetes cluster

Composition: allOf

Type: object

Properties:

Name Type Required Description
resource KubernetesCluster

KubernetesClusterPagedResourceResponse

Response with paged Kubernetes clusters

Composition: allOf

Type: object

Properties:

Name Type Required Description
resources array<KubernetesCluster>