1. Registry
  2. Packages
  3. Civo Provider
  4. API Docs
  5. getKubernetesClusters
Viewing docs for civo 1.4.0
published on Thursday, Nov 5, 2026 by civo
civo logo
Viewing docs for civo 1.4.0
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 dictionary
    data "civo_get_kubernetes_clusters" "name" {
        # arguments
    }

    The following arguments are supported:

    Filters List<GetKubernetesClustersFilter>
    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<GetKubernetesClustersSort>
    One or more key/direction pairs on which to sort results
    Filters []GetKubernetesClustersFilter
    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 []GetKubernetesClustersSort
    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<GetKubernetesClustersFilter>
    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<GetKubernetesClustersSort>
    One or more key/direction pairs on which to sort results
    filters GetKubernetesClustersFilter[]
    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 GetKubernetesClustersSort[]
    One or more key/direction pairs on which to sort results
    filters Sequence[GetKubernetesClustersFilter]
    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[GetKubernetesClustersSort]
    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<GetKubernetesClustersCluster>
    Id string
    The ID of this resource.
    Filters List<GetKubernetesClustersFilter>
    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<GetKubernetesClustersSort>
    One or more key/direction pairs on which to sort results
    Clusters []GetKubernetesClustersCluster
    Id string
    The ID of this resource.
    Filters []GetKubernetesClustersFilter
    One or more key/value pairs on which to filter results
    Region string
    If used, all clusters will be from the provided region
    Sorts []GetKubernetesClustersSort
    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<GetKubernetesClustersCluster>
    id String
    The ID of this resource.
    filters List<GetKubernetesClustersFilter>
    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<GetKubernetesClustersSort>
    One or more key/direction pairs on which to sort results
    clusters GetKubernetesClustersCluster[]
    id string
    The ID of this resource.
    filters GetKubernetesClustersFilter[]
    One or more key/value pairs on which to filter results
    region string
    If used, all clusters will be from the provided region
    sorts GetKubernetesClustersSort[]
    One or more key/direction pairs on which to sort results
    clusters Sequence[GetKubernetesClustersCluster]
    id str
    The ID of this resource.
    filters Sequence[GetKubernetesClustersFilter]
    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[GetKubernetesClustersSort]
    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

    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 String
    category String
    installed Boolean
    version String

    GetKubernetesClustersClusterPool

    instance_names list(string)
    label string
    labels map(string)
    node_count number
    public_ip_node_pool bool
    size string
    taints list(object)
    instanceNames List<String>
    label String
    labels Map<String>
    nodeCount Number
    publicIpNodePool Boolean
    size String
    taints List<Property Map>

    GetKubernetesClustersClusterPoolTaint

    Effect string
    Key string
    Value string
    Effect string
    Key string
    Value string
    effect string
    key string
    value string
    effect String
    key String
    value String
    effect string
    key string
    value string
    effect str
    key str
    value str
    effect String
    key String
    value String

    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 clusters which keys has value that matches one of the values provided here
    All bool
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    MatchBy string
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as 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 clusters which keys has value that matches one of the values provided here
    All bool
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    MatchBy string
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as 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 clusters which keys has value that matches one of the values provided here
    all bool
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    match_by string
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as 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 clusters which keys has value that matches one of the values provided here
    all Boolean
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    matchBy String
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as 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 clusters which keys has value that matches one of the values provided here
    all boolean
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    matchBy string
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as 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 clusters which keys has value that matches one of the values provided here
    all bool
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    match_by str
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as 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 clusters which keys has value that matches one of the values provided here
    all Boolean
    Set to true to require that a field match all of the values instead 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 the values are present in the list or set.
    matchBy String
    One of exact (default), re, or substring. For string-typed fields, specify re to match by using the values as regular expressions, or specify substring to match by treating the values as substrings to find within the string field.

    GetKubernetesClustersSort

    Key string
    Sort 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, volume_type.
    Direction string
    The sort direction. This may be either asc or desc.
    Key string
    Sort 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, volume_type.
    Direction string
    The sort direction. This may be either asc or desc.
    key string
    Sort 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, volume_type.
    direction string
    The sort direction. This may be either asc or desc.
    key String
    Sort 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, volume_type.
    direction String
    The sort direction. This may be either asc or desc.
    key string
    Sort 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, volume_type.
    direction string
    The sort direction. This may be either asc or desc.
    key str
    Sort 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, volume_type.
    direction str
    The sort direction. This may be either asc or desc.
    key String
    Sort 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, volume_type.
    direction String
    The sort direction. This may be either asc or desc.

    Package Details

    Repository
    Civo civo/terraform-provider-civo
    License
    Notes
    This Pulumi package is based on the civo Terraform Provider.
    civo logo
    Viewing docs for civo 1.4.0
    published on Thursday, Nov 5, 2026 by civo

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial