GitLab API

GitlabTool

Actions1095

Clusters → postApiV4AdminClustersAdd

AI-generated

Summary

Create a new Kubernetes cluster integration in GitLab by sending a POST request to the /api/v4/admin/clusters/add endpoint with the specified cluster configuration in the request body.

Inputs

  • skipAuthentication — Boolean flag to skip API authentication; defaults to false.
  • baseUrl — Base URL of the GitLab instance; defaults to https://gitlab.com.
  • method (required) — HTTP method to use; must be POST for this operation.
  • parameterSchema (required) — JSON schema defining the required body parameters for creating a new cluster according to the postApiV4AdminClustersAdd schema.

Output shape

a single record representing the created cluster

The operation returns the JSON response from GitLab's API upon successfully adding a new cluster. Errors or failures will be returned according to GitLab API's standard error format.

Examples

Example 1: Add a new Kubernetes cluster by providing required configuration in the request body.

Set 'method' to POST, provide cluster configuration in 'parameterSchema' according to GitLab's postApiV4AdminClustersAdd schema, and optionally override 'baseUrl' or skip authentication.

Links

Discussion