Open Context Protocol is live! 🚀 Read the launch post

createNodepools

Create NodePool

Details

  • Method: POST
  • Path: /kubernetes/clusters/{vke-id}/node-pools
  • Operation ID: create-nodepools

Parameters

{
  "node_quantity": {
    "description": "Number of instances in this nodepool",
    "required": true,
    "location": "body",
    "type": "integer"
  },
  "label": {
    "description": "Label for the nodepool. You cannot change the label after a nodepool is created. You cannot have duplicate node pool labels in the same cluster.",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "plan": {
    "description": "Plan that this nodepool will use",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "tag": {
    "description": "Tag for node pool",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "auto_scaler": {
    "description": "Option to use the auto scaler with your cluster. Default false.",
    "required": false,
    "location": "body",
    "type": "boolean"
  },
  "min_nodes": {
    "description": "Auto scaler field for minimum nodes you want for your cluster. Default 1.",
    "required": false,
    "location": "body",
    "type": "integer"
  },
  "max_nodes": {
    "description": "Auto scaler field for maximum nodes you want for your cluster. Default 1.",
    "required": false,
    "location": "body",
    "type": "integer"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "node_pool": {
      "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('createNodepools', {
    # Add required parameters here
})