KOP Providers - API - Rafay Product Documentation

API

Authorized users can access the Swagger UI for the REST APIs directly from the Console to view the list of V3 GKE clusters by project


Access to v3 APIs

To view the list of v3 API endpoints, perform the below steps

Platform API screen appears


List Clusters By Project

Under Cluster, use the below GET REST API to view the list of clusters under a project

Below is an example of the project defaultproject showing all the clusters associated with the provided project name


Create Cluster

Under Cluster, use the below POST REST API to create a GKE v3 Cluster under a project

Here is an example of creating a new v3 cluster named ak-v3-demo under the project defaultproject:

An illustration of the GKE v3 Cluster Specification is given below:

{
    "apiVersion": "infra.k8smgmt.io/v3",
    "kind": "Cluster",
    "metadata": {
        "name": "example-cluster2",
        "description": "",
        "project": "defaultproject"
    },
    "spec": {
        "cloudCredentials": "-dev-",
        "blueprint": {
            "name": "minimal",
            "version": "latest"
        },
        "type": "Gke",
        "preBootstrapCommands": [],
        "config": {
            "name": "example-cluster2",
            "project": "dev-382813",
            "description": "My cluster",
            "location": {
                "type": "zonal",
                "zone": "us-central-a"
            },
            "controlPlaneVersion": 1.26,
            "network": {
                "name": "default",
                "nodeSubnetName": "default",
                "networkAccess": {
                    "privacy": "public"
                },
                "enableVPCNativeTraffic": true,
                "maxPodsPerNode": 110,
                "enableControlPlaneAuthorizedNetworks": []
            },
            "nodePools": [
                {
                    "name": "default-nodepool",
                    "size": 3,
                    "nodeVersion": 1.25,
                    "machineConfig": {
                        "imageType": "COS_CONTAINERD",
                        "machineType": "e2-medium",
                        "bootDiskType": "pd-standard",
                        "bootDiskSize": 100
                    },
                    "management": {
                        "autoUpgrade": true
                    },
                    "upgradeSettings": {
                        "strategy": "BLUE_GREEN",
                        "config": {
                            "batchNodeCount": 1,
                            "batchSoakDuration": "1s",
                            "nodePoolSoakDuration": "3600s"
                        }
                    }
                }
            ],
            "security": {
                "enableWorkloadIdentity": true
            },
            "feature": {
                "enableCloudLogging": false,
                "enableCloudMonitoring": false,
                "enableManagedServiceforPrometheus": false,
                "enableApplicationManagerBeta": false,
                "enableBackupforGKE": false,
                "enableComputeEnginePersistentDiskCSIDriver": true,
                "enableFilestoreCSIDriver": false,
                "enableImageStreaming": false
            }
        }
    }
}

Cluster Detail

To view the detail of a specific v3 cluster, use the below GET REST API

Here is an example detailing the cluster named ak-v3-test5 under the project defaultproject: