GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific cluster from a group in GitLab using the GitLab API. It is useful for managing and cleaning up clusters associated with groups, especially when a cluster is no longer needed or should be removed for security or organizational reasons. For example, a DevOps engineer might use this node to automate the removal of outdated or unused Kubernetes clusters linked to a GitLab group.

Use Case Examples

  1. Deleting a Kubernetes cluster from a GitLab group to free up resources.
  2. Automating cluster cleanup in CI/CD pipelines by removing clusters that are no longer in use.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is relevant for this operation.
Path Parameters Parameters required in the URL path to identify the group and cluster to delete.

Output

JSON

  • statusCode - HTTP status code returned by the API after the delete operation.
  • responseBody - The body of the response from the API, typically empty or containing confirmation of deletion.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID and cluster ID are correct and exist in GitLab to avoid 404 Not Found errors.
  • Check that the API key used has sufficient permissions to delete clusters in the specified group to avoid 403 Forbidden errors.
  • Verify the base URL is correct if using a self-hosted GitLab instance to avoid connection errors.

Links

Discussion