Create a group cluster
POST
/api/v4/groups/{id}/clusters/user
Creates a group cluster for a specified group by adding an existing Kubernetes cluster.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
The ID of the group
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Cluster name
string
enabled
Determines if cluster is active or not, defaults to true
boolean
environment_scope
The associated environment to the cluster
string
namespace_per_environment
Deploy each environment to a separate Kubernetes namespace
boolean
domain
Cluster base domain
string
management_project_id
The ID of the management project
integer
managed
Determines if GitLab will manage namespaces and service accounts for this cluster, defaults to true
boolean
platform_kubernetes_attributes
required
Platform Kubernetes data
object
api_url
required
URL to access the Kubernetes API
string
token
required
Token to authenticate against Kubernetes
string
ca_cert
TLS certificate (needed if API is using a self-signed TLS certificate)
string
namespace
Unique namespace related to Group
string
authorization_type
Cluster authorization type, defaults to RBAC
string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
id
string
name
string
created_at
string
domain
string
enabled
string
managed
string
provider_type
string
platform_type
string
environment_scope
string
cluster_type
string
namespace_per_environment
string
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
platform_kubernetes
object
api_url
string
namespace
string
authorization_type
string
ca_cert
string
provider_gcp
object
cluster_id
string
status_name
string
gcp_project_id
string
zone
string
machine_type
string
num_nodes
string
endpoint
string
management_project
object
id
integer format: int64
description
string
name
string
name_with_namespace
string
path
string
path_with_namespace
string
created_at
string format: date-time
group
object
id
integer format: int64
web_url
string
name
string
Example
{ "user": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "management_project": { "id": 1, "description": "desc", "name": "project1", "name_with_namespace": "John Doe / project1", "path": "project1", "path_with_namespace": "namespace1/project1", "created_at": "2020-05-07T04:27:17.016Z" }, "group": { "web_url": "http://gitlab.example.com/groups/diaspora", "name": "Diaspora" }}Validation error
Forbidden
Not found