published on Thursday, Nov 5, 2026 by civo
published on Thursday, Nov 5, 2026 by civo
Get information on Kubernetes clusters for use in other resources, with the ability to filter and sort the results. If no filters are specified, all clusters in the region will be returned.
Note: You can use the civo.KubernetesCluster data source to obtain metadata about a single cluster, including its kubeconfig, if you already know the id or name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";
const lon1 = civo.getKubernetesClusters({
region: "LON1",
filters: [{
key: "status",
values: ["ACTIVE"],
}],
});
export const clusterEndpoints = lon1.then(lon1 => .reduce((__obj, cluster) => ({ ...__obj, [cluster.name]: cluster.apiEndpoint })));
import pulumi
import pulumi_civo as civo
lon1 = civo.get_kubernetes_clusters(region="LON1",
filters=[{
"key": "status",
"values": ["ACTIVE"],
}])
pulumi.export("clusterEndpoints", {cluster.name: cluster.api_endpoint for cluster in lon1.clusters})
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Civo = Pulumi.Civo;
return await Deployment.RunAsync(() =>
{
var lon1 = Civo.GetKubernetesClusters.Invoke(new()
{
Region = "LON1",
Filters = new[]
{
new Civo.Inputs.GetKubernetesClustersFilterInputArgs
{
Key = "status",
Values = new[]
{
"ACTIVE",
},
},
},
});
return new Dictionary<string, object?>
{
["clusterEndpoints"] = .ToDictionary(item => {
var cluster = item.Value;
return cluster.Name;
}, item => {
var cluster = item.Value;
return cluster.ApiEndpoint;
}),
};
});
Example coming soon!
Example coming soon!
Example coming soon!
Using getKubernetesClusters
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getKubernetesClusters(args: GetKubernetesClustersArgs, opts?: InvokeOptions): Promise<GetKubernetesClustersResult>
function getKubernetesClustersOutput(args: GetKubernetesClustersOutputArgs, opts?: InvokeOutputOptions): Output<GetKubernetesClustersResult>def get_kubernetes_clusters(filters: Optional[Sequence[GetKubernetesClustersFilter]] = None,
id: Optional[str] = None,
region: Optional[str] = None,
sorts: Optional[Sequence[GetKubernetesClustersSort]] = None,
opts: Optional[InvokeOptions] = None) -> GetKubernetesClustersResult
def get_kubernetes_clusters_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetKubernetesClustersFilterArgs]]]] = None,
id: pulumi.Input[Optional[str]] = None,
region: pulumi.Input[Optional[str]] = None,
sorts: pulumi.Input[Optional[Sequence[pulumi.Input[GetKubernetesClustersSortArgs]]]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetKubernetesClustersResult]func GetKubernetesClusters(ctx *Context, args *GetKubernetesClustersArgs, opts ...InvokeOption) (*GetKubernetesClustersResult, error)
func GetKubernetesClustersOutput(ctx *Context, args *GetKubernetesClustersOutputArgs, opts ...InvokeOption) GetKubernetesClustersResultOutput> Note: This function is named GetKubernetesClusters in the Go SDK.
public static class GetKubernetesClusters
{
public static Task<GetKubernetesClustersResult> InvokeAsync(GetKubernetesClustersArgs args, InvokeOptions? opts = null)
public static Output<GetKubernetesClustersResult> Invoke(GetKubernetesClustersInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetKubernetesClustersResult> Invoke(GetKubernetesClustersInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetKubernetesClustersResult> getKubernetesClusters(GetKubernetesClustersArgs args, InvokeOptions options)
public static Output<GetKubernetesClustersResult> getKubernetesClusters(GetKubernetesClustersArgs args, InvokeOptions options)
public static Output<GetKubernetesClustersResult> getKubernetesClusters(GetKubernetesClustersArgs args, InvokeOutputOptions options)
fn::invoke:
function: civo:index/getKubernetesClusters:getKubernetesClusters
arguments:
# arguments dictionarydata "civo_get_kubernetes_clusters" "name" {
# arguments
}The following arguments are supported:
- Filters
List<Get
Kubernetes Clusters Filter> - One or more key/value pairs on which to filter results
- Id string
- The ID of this resource.
- Region string
- If used, all clusters will be from the provided region
- Sorts
List<Get
Kubernetes Clusters Sort> - One or more key/direction pairs on which to sort results
- Filters
[]Get
Kubernetes Clusters Filter - One or more key/value pairs on which to filter results
- Id string
- The ID of this resource.
- Region string
- If used, all clusters will be from the provided region
- Sorts
[]Get
Kubernetes Clusters Sort - One or more key/direction pairs on which to sort results
- filters list(object)
- One or more key/value pairs on which to filter results
- id string
- The ID of this resource.
- region string
- If used, all clusters will be from the provided region
- sorts list(object)
- One or more key/direction pairs on which to sort results
- filters
List<Get
Kubernetes Clusters Filter> - One or more key/value pairs on which to filter results
- id String
- The ID of this resource.
- region String
- If used, all clusters will be from the provided region
- sorts
List<Get
Kubernetes Clusters Sort> - One or more key/direction pairs on which to sort results
- filters
Get
Kubernetes Clusters Filter[] - One or more key/value pairs on which to filter results
- id string
- The ID of this resource.
- region string
- If used, all clusters will be from the provided region
- sorts
Get
Kubernetes Clusters Sort[] - One or more key/direction pairs on which to sort results
- filters
Sequence[Get
Kubernetes Clusters Filter] - One or more key/value pairs on which to filter results
- id str
- The ID of this resource.
- region str
- If used, all clusters will be from the provided region
- sorts
Sequence[Get
Kubernetes Clusters Sort] - One or more key/direction pairs on which to sort results
- filters List<Property Map>
- One or more key/value pairs on which to filter results
- id String
- The ID of this resource.
- region String
- If used, all clusters will be from the provided region
- sorts List<Property Map>
- One or more key/direction pairs on which to sort results
getKubernetesClusters Result
The following output properties are available:
- Clusters
List<Get
Kubernetes Clusters Cluster> - Id string
- The ID of this resource.
- Filters
List<Get
Kubernetes Clusters Filter> - One or more key/value pairs on which to filter results
- Region string
- If used, all clusters will be from the provided region
- Sorts
List<Get
Kubernetes Clusters Sort> - One or more key/direction pairs on which to sort results
- Clusters
[]Get
Kubernetes Clusters Cluster - Id string
- The ID of this resource.
- Filters
[]Get
Kubernetes Clusters Filter - One or more key/value pairs on which to filter results
- Region string
- If used, all clusters will be from the provided region
- Sorts
[]Get
Kubernetes Clusters Sort - One or more key/direction pairs on which to sort results
- clusters list(object)
- id string
- The ID of this resource.
- filters list(object)
- One or more key/value pairs on which to filter results
- region string
- If used, all clusters will be from the provided region
- sorts list(object)
- One or more key/direction pairs on which to sort results
- clusters
List<Get
Kubernetes Clusters Cluster> - id String
- The ID of this resource.
- filters
List<Get
Kubernetes Clusters Filter> - One or more key/value pairs on which to filter results
- region String
- If used, all clusters will be from the provided region
- sorts
List<Get
Kubernetes Clusters Sort> - One or more key/direction pairs on which to sort results
- clusters
Get
Kubernetes Clusters Cluster[] - id string
- The ID of this resource.
- filters
Get
Kubernetes Clusters Filter[] - One or more key/value pairs on which to filter results
- region string
- If used, all clusters will be from the provided region
- sorts
Get
Kubernetes Clusters Sort[] - One or more key/direction pairs on which to sort results
- clusters
Sequence[Get
Kubernetes Clusters Cluster] - id str
- The ID of this resource.
- filters
Sequence[Get
Kubernetes Clusters Filter] - One or more key/value pairs on which to filter results
- region str
- If used, all clusters will be from the provided region
- sorts
Sequence[Get
Kubernetes Clusters Sort] - One or more key/direction pairs on which to sort results
- clusters List<Property Map>
- id String
- The ID of this resource.
- filters List<Property Map>
- One or more key/value pairs on which to filter results
- region String
- If used, all clusters will be from the provided region
- sorts List<Property Map>
- One or more key/direction pairs on which to sort results
Supporting Types
GetKubernetesClustersCluster
- Api
Endpoint string - Cluster
Type string - Cni string
- Created
At string - Dns
Entry string - Firewall
Id string - Id string
- Installed
Applications List<GetKubernetes Clusters Cluster Installed Application> - Kubernetes
Version string - Master
Ip string - Name string
- Network
Id string - Pools
List<Get
Kubernetes Clusters Cluster Pool> - Ready bool
- Region string
- Status string
- List<string>
- Volume
Type string
- Api
Endpoint string - Cluster
Type string - Cni string
- Created
At string - Dns
Entry string - Firewall
Id string - Id string
- Installed
Applications []GetKubernetes Clusters Cluster Installed Application - Kubernetes
Version string - Master
Ip string - Name string
- Network
Id string - Pools
[]Get
Kubernetes Clusters Cluster Pool - Ready bool
- Region string
- Status string
- []string
- Volume
Type string
- api_
endpoint string - cluster_
type string - cni string
- created_
at string - dns_
entry string - firewall_
id string - id string
- installed_
applications list(object) - kubernetes_
version string - master_
ip string - name string
- network_
id string - pools list(object)
- ready bool
- region string
- status string
- list(string)
- volume_
type string
- api
Endpoint String - cluster
Type String - cni String
- created
At String - dns
Entry String - firewall
Id String - id String
- installed
Applications List<GetKubernetes Clusters Cluster Installed Application> - kubernetes
Version String - master
Ip String - name String
- network
Id String - pools
List<Get
Kubernetes Clusters Cluster Pool> - ready Boolean
- region String
- status String
- List<String>
- volume
Type String
- api
Endpoint string - cluster
Type string - cni string
- created
At string - dns
Entry string - firewall
Id string - id string
- installed
Applications GetKubernetes Clusters Cluster Installed Application[] - kubernetes
Version string - master
Ip string - name string
- network
Id string - pools
Get
Kubernetes Clusters Cluster Pool[] - ready boolean
- region string
- status string
- string[]
- volume
Type string
- api_
endpoint str - cluster_
type str - cni str
- created_
at str - dns_
entry str - firewall_
id str - id str
- installed_
applications Sequence[GetKubernetes Clusters Cluster Installed Application] - kubernetes_
version str - master_
ip str - name str
- network_
id str - pools
Sequence[Get
Kubernetes Clusters Cluster Pool] - ready bool
- region str
- status str
- Sequence[str]
- volume_
type str
- api
Endpoint String - cluster
Type String - cni String
- created
At String - dns
Entry String - firewall
Id String - id String
- installed
Applications List<Property Map> - kubernetes
Version String - master
Ip String - name String
- network
Id String - pools List<Property Map>
- ready Boolean
- region String
- status String
- List<String>
- volume
Type String
GetKubernetesClustersClusterInstalledApplication
- Application string
- Category string
- Installed bool
- Version string
- Application string
- Category string
- Installed bool
- Version string
- application string
- category string
- installed bool
- version string
- application String
- category String
- installed Boolean
- version String
- application string
- category string
- installed boolean
- version string
- application str
- category str
- installed bool
- version str
- application String
- category String
- installed Boolean
- version String
GetKubernetesClustersClusterPool
- Instance
Names List<string> - Label string
- Labels Dictionary<string, string>
- Node
Count double - Public
Ip boolNode Pool - Size string
- Taints
List<Get
Kubernetes Clusters Cluster Pool Taint>
- Instance
Names []string - Label string
- Labels map[string]string
- Node
Count float64 - Public
Ip boolNode Pool - Size string
- Taints
[]Get
Kubernetes Clusters Cluster Pool Taint
- instance_
names list(string) - label string
- labels map(string)
- node_
count number - public_
ip_ boolnode_ pool - size string
- taints list(object)
- instance
Names List<String> - label String
- labels Map<String,String>
- node
Count Double - public
Ip BooleanNode Pool - size String
- taints
List<Get
Kubernetes Clusters Cluster Pool Taint>
- instance
Names string[] - label string
- labels {[key: string]: string}
- node
Count number - public
Ip booleanNode Pool - size string
- taints
Get
Kubernetes Clusters Cluster Pool Taint[]
- instance_
names Sequence[str] - label str
- labels Mapping[str, str]
- node_
count float - public_
ip_ boolnode_ pool - size str
- taints
Sequence[Get
Kubernetes Clusters Cluster Pool Taint]
- instance
Names List<String> - label String
- labels Map<String>
- node
Count Number - public
Ip BooleanNode Pool - size String
- taints List<Property Map>
GetKubernetesClustersClusterPoolTaint
GetKubernetesClustersFilter
- Key string
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - Values List<string>
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - All bool
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - Match
By string - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
- Key string
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - Values []string
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - All bool
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - Match
By string - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
- key string
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - values list(string)
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - all bool
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - match_
by string - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
- key String
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - values List<String>
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - all Boolean
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - match
By String - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
- key string
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - values string[]
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - all boolean
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - match
By string - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
- key str
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - values Sequence[str]
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - all bool
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - match_
by str - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
- key String
- Filter clusters by this key. This may be one of
api_endpoint,cluster_type,cni,created_at,dns_entry,firewall_id,id,kubernetes_version,master_ip,name,network_id,ready,region,status,tags,volume_type. - values List<String>
- Only retrieves
clusterswhich keys has value that matches one of the values provided here - all Boolean
- Set to
trueto require that a field match all of thevaluesinstead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of thevaluesare present in the list or set. - match
By String - One of
exact(default),re, orsubstring. For string-typed fields, specifyreto match by using thevaluesas regular expressions, or specifysubstringto match by treating thevaluesas substrings to find within the string field.
GetKubernetesClustersSort
Package Details
- Repository
- Civo civo/terraform-provider-civo
- License
- Notes
- This Pulumi package is based on the
civoTerraform Provider.
published on Thursday, Nov 5, 2026 by civo