Open Context Protocol is live! 🚀 Read the launch post
getKubernetesClusters

getKubernetesClusters

Get Kubernetes Cluster

Details

  • Method: GET
  • Path: /kubernetes/clusters/{vke-id}
  • Operation ID: get-kubernetes-clusters

Parameters

{}

Response Schema

{
  "type": "object",
  "properties": {
    "vke_cluster": {
      "title": "vke-cluster",
      "type": "object",
      "x-examples": {
        "example vke cluster": {
          "id": "455dcd32-e621-48ee-a10e-0cb5f754e13e",
          "label": "vke",
          "date_created": "2021-07-07T22:57:01+00:00",
          "cluster_subnet": "10.244.0.0/16",
          "service_subnet": "10.96.0.0/12",
          "ip": "0.0.0.0",
          "endpoint": "455dcd32-e621-48ee-a10e-0cb5f754e13e.vultr-k8s.com",
          "version": "v1.20.0+1",
          "region": "lax",
          "status": "pending",
          "node_pools": [
            {
              "id": "11e4443a-f92a-46d6-94c8-61c1a1a7514e",
              "date_created": "2021-07-07T22:57:01+00:00",
              "label": "my-label",
              "tag": "my-tag",
              "plan": "vc2-1c-2gb",
              "status": "pending",
              "node_quantity": 2,
              "nodes": [
                {
                  "id": "43eda5c8-67f7-4c63-88bc-2f568b48b2b0",
                  "label": "my-label-6ac60e6313dd1",
                  "date_created": "2021-07-07T22:57:01+00:00",
                  "status": "pending"
                },
                {
                  "id": "15a7893d-d584-45d5-a74c-d9f46866aa3c",
                  "label": "my-label-6ac60e6313ddc",
                  "date_created": "2021-07-07T22:57:01+00:00",
                  "status": "pending"
                }
              ]
            }
          ]
        }
      },
      "x-tags": [
        "kubernetes"
      ],
      "description": "VKE Cluster",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID for the VKE cluster"
        },
        "label": {
          "type": "string",
          "description": "Label for your cluster"
        },
        "date_created": {
          "type": "string",
          "description": "Date of creation"
        },
        "cluster_subnet": {
          "type": "string",
          "description": "IP range that your pods will run on in this cluster"
        },
        "service_subnet": {
          "type": "string",
          "description": "IP range that services will run on this cluster"
        },
        "ip": {
          "type": "string",
          "description": "IP for your Kubernetes Clusters Control Plane"
        },
        "endpoint": {
          "type": "string",
          "description": "Domain for your Kubernetes Clusters Control Plane"
        },
        "version": {
          "type": "string",
          "description": "Version of Kubernetes this cluster is running on"
        },
        "region": {
          "type": "string",
          "description": "Region this Kubernetes Cluster is running in"
        },
        "status": {
          "type": "string",
          "description": "Status for VKE cluster"
        },
        "node_pools": {
          "type": "array",
          "description": "NodePools in this cluster",
          "items": {
            "title": "nodepools",
            "type": "object",
            "x-examples": {
              "example nodepool": {
                "id": "11e4443a-f92a-46d6-94c8-61c1a1a7514e",
                "date_created": "2021-07-07T22:57:01+00:00",
                "label": "my-label",
                "tag": "my-tag",
                "plan": "vc2-1c-2gb",
                "status": "pending",
                "node_quantity": 2,
                "min_nodes": 2,
                "max_nodes": 5,
                "auto_scaler": true,
                "nodes": [
                  {
                    "id": "43eda5c8-67f7-4c63-88bc-2f568b48b2b0",
                    "label": "my-label-48770259-6ac60e6313dd1",
                    "date_created": "2021-07-07T22:57:01+00:00",
                    "status": "pending"
                  },
                  {
                    "id": "15a7893d-d584-45d5-a74c-d9f46866aa3c",
                    "label": "my-label-48770259-6ac60e6313ddc",
                    "date_created": "2021-07-07T22:57:01+00:00",
                    "status": "pending"
                  }
                ]
              }
            },
            "description": "NodePool",
            "x-tags": [
              "kubernetes"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The [NodePool ID](#operation/get-nodepools)."
              },
              "date_created": {
                "type": "string",
                "description": "Date of creation"
              },
              "label": {
                "type": "string",
                "description": "Label for nodepool"
              },
              "tag": {
                "type": "string",
                "description": "Tag for node pool"
              },
              "plan": {
                "type": "string",
                "description": "Plan used for nodepool"
              },
              "status": {
                "type": "string",
                "description": "Status for nodepool"
              },
              "node_quantity": {
                "type": "integer",
                "description": "Number of nodes in nodepool"
              },
              "nodes": {
                "type": "array",
                "items": {
                  "title": "nodepool-instances",
                  "type": "object",
                  "description": "Instance that belongs to a nodepool",
                  "x-examples": {
                    "example nodepool": {
                      "id": "43eda5c8-67f7-4c63-88bc-2f568b48b2b0",
                      "label": "my-label-48770259-6ac60e6313dd1",
                      "date_created": "2021-07-07T22:57:01+00:00",
                      "status": "pending"
                    }
                  },
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the nodepool instance"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label of the nodepool instance"
                    },
                    "date_created": {
                      "type": "string",
                      "description": "Date of creation"
                    }
                  }
                }
              },
              "date_updated": {
                "type": "string",
                "description": "Date the nodepool was updated."
              },
              "auto_scaler": {
                "type": "boolean",
                "description": "Displays if the auto scaler is enabled or disabled for your cluster."
              },
              "min_nodes": {
                "type": "integer",
                "description": "Auto scaler field that displays the minimum nodes you want for your cluster."
              },
              "max_nodes": {
                "description": "Auto scaler field that displays the maximum nodes you want for your cluster.",
                "type": "integer"
              }
            }
          }
        }
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('vultr')

# Call this tool
result = await agent.call_tool('getKubernetesClusters', {
    # Add required parameters here
})