GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a specific cluster from a project in GitLab using the GitLab API. It is useful for managing and cleaning up clusters associated with projects, especially when clusters are no longer needed or need to 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 GitLab projects.

Use Case Examples

  1. Deleting a cluster from a project by specifying the project ID and cluster ID to keep the project environment clean.
  2. Automating cluster management by integrating this node in workflows that remove clusters after certain conditions are met, such as project archiving or cluster deprecation.

Properties

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

Output

JSON

  • success - Indicates whether the cluster deletion was successful.
  • statusCode - HTTP status code returned by the API after the delete operation.

Dependencies

  • GitLab API key credential

Troubleshooting

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

Links

Discussion