GitLab API

GitlabTool

Actions1095

Clusters → deleteApiV4ProjectsIdClustersClusterId

AI-generated

Summary

Delete a specific Kubernetes cluster linked to a GitLab project by providing the project ID or URL-encoded path and the cluster ID.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project from which the cluster will be deleted.
  • cluster_id (required) — The ID of the Kubernetes cluster to delete within the specified project.
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com if not specified.
  • skipAuthentication — Flag to skip authentication; defaults to false.

Output shape

a JSON object representing the GitLab API response for the cluster deletion request

The response shape conforms to the GitLab API's delete cluster endpoint. No pagination or additional fields are applicable. Successful deletion usually returns an empty body or confirmation status. Errors will be returned as per GitLab API error formatting.

Examples

Example 1: Removing a cluster from a project during CI/CD optimization

Specify the project ID or its URL-encoded path in 'id' and the cluster's numeric ID in 'cluster_id'. Optionally specify a custom GitLab baseUrl if not using gitlab.com. Authenticate via credentials unless skipping authentication.

Links

Discussion