Buildkite CLI cluster command
The bk cluster command allows you to manage Buildkite organization clusters from the command line.
Commands
| Command | Description |
|---|---|
bk cluster list |
List clusters. |
bk cluster view |
View cluster information. |
bk cluster create |
Create a new cluster. |
bk cluster update |
Update a cluster. |
bk cluster delete |
Delete a cluster. |
List clusters
List clusters.
bk cluster list [flags]
Flags
| Flag | Description |
|---|---|
-o, --output=""
|
Output format. One of: json, yaml, text |
--debug |
Enable debug output for REST API calls |
--json |
Output as JSON |
--text |
Output as text |
--yaml |
Output as YAML |
Examples
List all clusters:
bk cluster list
List clusters in JSON format:
bk cluster list -o json
View a cluster
View cluster information.
bk cluster view <cluster-uuid> [flags]
Arguments
| Argument | Description |
|---|---|
<cluster-uuid> |
Cluster UUID to view |
Flags
| Flag | Description |
|---|---|
-o, --output=""
|
Output format. One of: json, yaml, text |
--debug |
Enable debug output for REST API calls |
--json |
Output as JSON |
--text |
Output as text |
--yaml |
Output as YAML |
Examples
View a cluster:
bk cluster view my-cluster-uuid
View cluster in JSON format:
bk cluster view my-cluster-uuid -o json
Create a cluster
Create a new cluster.
bk cluster create --name=STRING [flags]
Flags
| Flag | Description |
|---|---|
-o, --output=""
|
Output format. One of: json, yaml, text |
--color=STRING |
A color hex code for the cluster (e.g. #FF0000) |
--debug |
Enable debug output for REST API calls |
--description=STRING |
A description of the cluster |
--emoji=STRING |
An emoji for the cluster (e.g. 🚀) |
--json |
Output as JSON |
--name=STRING |
The name of the cluster |
--text |
Output as text |
--yaml |
Output as YAML |
Examples
Create a cluster with just a name:
bk cluster create --name "My Cluster"
Create a cluster with all fields:
bk cluster create --name "My Cluster" --description "Runs production workloads" --emoji 🚀 --color "#FF0000"
Create a cluster and output as JSON:
bk cluster create --name "My Cluster" -o json
Update cluster
Update a cluster.
bk cluster update <cluster-uuid> [flags]
Arguments
| Argument | Description |
|---|---|
<cluster-uuid> |
Cluster UUID to update |
Flags
| Flag | Description |
|---|---|
-o, --output=""
|
Output format. One of: json, yaml, text |
--color=STRING |
New color hex code for the cluster (e.g. #FF0000) |
--debug |
Enable debug output for REST API calls |
--default-queue-id=STRING |
UUID of the queue to set as the default |
--description=STRING |
New description for the cluster |
--emoji=STRING |
New emoji for the cluster (e.g. 🚀) |
--json |
Output as JSON |
--name=STRING |
New name for the cluster |
--text |
Output as text |
--yaml |
Output as YAML |
Examples
Update a cluster's name:
bk cluster update my-cluster-uuid --name "New Name"
Update description and color:
bk cluster update my-cluster-uuid --description "Updated description" --color "#00FF00"
Set the default queue:
bk cluster update my-cluster-uuid --default-queue-id my-queue-uuid
Output the updated cluster as JSON:
bk cluster update my-cluster-uuid --name "New Name" -o json
Delete cluster
Delete a cluster.
bk cluster delete <cluster-uuid>
Arguments
| Argument | Description |
|---|---|
<cluster-uuid> |
Cluster UUID to delete |
Flags
| Flag | Description |
|---|---|
--debug |
Enable debug output for REST API calls |
Examples
Delete a cluster (with confirmation prompt):
bk cluster delete my-cluster-uuid
Delete a cluster without confirmation:
bk cluster delete my-cluster-uuid --yes