1. Packages
  2. Civo Provider
  3. API Docs
  4. getKubernetesCluster
Civo v2.4.6 published on Wednesday, Nov 6, 2024 by Pulumi

civo.getKubernetesCluster

Explore with Pulumi AI

civo logo
Civo v2.4.6 published on Wednesday, Nov 6, 2024 by Pulumi

    Provides a Civo Kubernetes cluster data source.

    Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as civo from "@pulumi/civo";
    
    const my-cluster = civo.getKubernetesCluster({
        name: "my-super-cluster",
    });
    export const kubernetesClusterOutput = my_cluster.then(my_cluster => my_cluster.masterIp);
    
    import pulumi
    import pulumi_civo as civo
    
    my_cluster = civo.get_kubernetes_cluster(name="my-super-cluster")
    pulumi.export("kubernetesClusterOutput", my_cluster.master_ip)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-civo/sdk/v2/go/civo"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		my_cluster, err := civo.LookupKubernetesCluster(ctx, &civo.LookupKubernetesClusterArgs{
    			Name: pulumi.StringRef("my-super-cluster"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("kubernetesClusterOutput", my_cluster.MasterIp)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Civo = Pulumi.Civo;
    
    return await Deployment.RunAsync(() => 
    {
        var my_cluster = Civo.GetKubernetesCluster.Invoke(new()
        {
            Name = "my-super-cluster",
        });
    
        return new Dictionary<string, object?>
        {
            ["kubernetesClusterOutput"] = my_cluster.Apply(my_cluster => my_cluster.Apply(getKubernetesClusterResult => getKubernetesClusterResult.MasterIp)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.civo.CivoFunctions;
    import com.pulumi.civo.inputs.GetKubernetesClusterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var my-cluster = CivoFunctions.getKubernetesCluster(GetKubernetesClusterArgs.builder()
                .name("my-super-cluster")
                .build());
    
            ctx.export("kubernetesClusterOutput", my_cluster.masterIp());
        }
    }
    
    variables:
      my-cluster:
        fn::invoke:
          Function: civo:getKubernetesCluster
          Arguments:
            name: my-super-cluster
    outputs:
      kubernetesClusterOutput: ${["my-cluster"].masterIp}
    

    Using getKubernetesCluster

    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 getKubernetesCluster(args: GetKubernetesClusterArgs, opts?: InvokeOptions): Promise<GetKubernetesClusterResult>
    function getKubernetesClusterOutput(args: GetKubernetesClusterOutputArgs, opts?: InvokeOptions): Output<GetKubernetesClusterResult>
    def get_kubernetes_cluster(id: Optional[str] = None,
                               name: Optional[str] = None,
                               region: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetKubernetesClusterResult
    def get_kubernetes_cluster_output(id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               region: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesClusterResult]
    func LookupKubernetesCluster(ctx *Context, args *LookupKubernetesClusterArgs, opts ...InvokeOption) (*LookupKubernetesClusterResult, error)
    func LookupKubernetesClusterOutput(ctx *Context, args *LookupKubernetesClusterOutputArgs, opts ...InvokeOption) LookupKubernetesClusterResultOutput

    > Note: This function is named LookupKubernetesCluster in the Go SDK.

    public static class GetKubernetesCluster 
    {
        public static Task<GetKubernetesClusterResult> InvokeAsync(GetKubernetesClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetKubernetesClusterResult> Invoke(GetKubernetesClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKubernetesClusterResult> getKubernetesCluster(GetKubernetesClusterArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: civo:index/getKubernetesCluster:getKubernetesCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of this resource.
    Name string
    The name of the Kubernetes Cluster
    Region string
    The region where cluster is running
    Id string
    The ID of this resource.
    Name string
    The name of the Kubernetes Cluster
    Region string
    The region where cluster is running
    id String
    The ID of this resource.
    name String
    The name of the Kubernetes Cluster
    region String
    The region where cluster is running
    id string
    The ID of this resource.
    name string
    The name of the Kubernetes Cluster
    region string
    The region where cluster is running
    id str
    The ID of this resource.
    name str
    The name of the Kubernetes Cluster
    region str
    The region where cluster is running
    id String
    The ID of this resource.
    name String
    The name of the Kubernetes Cluster
    region String
    The region where cluster is running

    getKubernetesCluster Result

    The following output properties are available:

    ApiEndpoint string
    The base URL of the API server on the Kubernetes master node
    Applications string
    A list of application installed
    Cni string
    The cni for the k3s to install (the default is flannel) valid options are cilium or flannel
    CreatedAt string
    The date where the Kubernetes cluster was create
    DnsEntry string
    The unique dns entry for the cluster in this case point to the master
    InstalledApplications List<GetKubernetesClusterInstalledApplication>
    Kubeconfig string
    A representation of the Kubernetes cluster's kubeconfig in yaml format
    KubernetesVersion string
    The version of Kubernetes
    MasterIp string
    The IP of the Kubernetes master node
    NumTargetNodes int
    The size of the Kubernetes cluster

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    Pools List<GetKubernetesClusterPool>
    Ready bool
    If the Kubernetes cluster is ready
    Status string
    The status of Kubernetes cluster
    Tags List<string>
    A list of tags
    TargetNodesSize string
    The size of each node

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    Id string
    The ID of this resource.
    Name string
    The name of the Kubernetes Cluster
    Region string
    The region where cluster is running
    ApiEndpoint string
    The base URL of the API server on the Kubernetes master node
    Applications string
    A list of application installed
    Cni string
    The cni for the k3s to install (the default is flannel) valid options are cilium or flannel
    CreatedAt string
    The date where the Kubernetes cluster was create
    DnsEntry string
    The unique dns entry for the cluster in this case point to the master
    InstalledApplications []GetKubernetesClusterInstalledApplication
    Kubeconfig string
    A representation of the Kubernetes cluster's kubeconfig in yaml format
    KubernetesVersion string
    The version of Kubernetes
    MasterIp string
    The IP of the Kubernetes master node
    NumTargetNodes int
    The size of the Kubernetes cluster

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    Pools []GetKubernetesClusterPool
    Ready bool
    If the Kubernetes cluster is ready
    Status string
    The status of Kubernetes cluster
    Tags []string
    A list of tags
    TargetNodesSize string
    The size of each node

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    Id string
    The ID of this resource.
    Name string
    The name of the Kubernetes Cluster
    Region string
    The region where cluster is running
    apiEndpoint String
    The base URL of the API server on the Kubernetes master node
    applications String
    A list of application installed
    cni String
    The cni for the k3s to install (the default is flannel) valid options are cilium or flannel
    createdAt String
    The date where the Kubernetes cluster was create
    dnsEntry String
    The unique dns entry for the cluster in this case point to the master
    installedApplications List<GetKubernetesClusterInstalledApplication>
    kubeconfig String
    A representation of the Kubernetes cluster's kubeconfig in yaml format
    kubernetesVersion String
    The version of Kubernetes
    masterIp String
    The IP of the Kubernetes master node
    numTargetNodes Integer
    The size of the Kubernetes cluster

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    pools List<GetKubernetesClusterPool>
    ready Boolean
    If the Kubernetes cluster is ready
    status String
    The status of Kubernetes cluster
    tags List<String>
    A list of tags
    targetNodesSize String
    The size of each node

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    id String
    The ID of this resource.
    name String
    The name of the Kubernetes Cluster
    region String
    The region where cluster is running
    apiEndpoint string
    The base URL of the API server on the Kubernetes master node
    applications string
    A list of application installed
    cni string
    The cni for the k3s to install (the default is flannel) valid options are cilium or flannel
    createdAt string
    The date where the Kubernetes cluster was create
    dnsEntry string
    The unique dns entry for the cluster in this case point to the master
    installedApplications GetKubernetesClusterInstalledApplication[]
    kubeconfig string
    A representation of the Kubernetes cluster's kubeconfig in yaml format
    kubernetesVersion string
    The version of Kubernetes
    masterIp string
    The IP of the Kubernetes master node
    numTargetNodes number
    The size of the Kubernetes cluster

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    pools GetKubernetesClusterPool[]
    ready boolean
    If the Kubernetes cluster is ready
    status string
    The status of Kubernetes cluster
    tags string[]
    A list of tags
    targetNodesSize string
    The size of each node

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    id string
    The ID of this resource.
    name string
    The name of the Kubernetes Cluster
    region string
    The region where cluster is running
    api_endpoint str
    The base URL of the API server on the Kubernetes master node
    applications str
    A list of application installed
    cni str
    The cni for the k3s to install (the default is flannel) valid options are cilium or flannel
    created_at str
    The date where the Kubernetes cluster was create
    dns_entry str
    The unique dns entry for the cluster in this case point to the master
    installed_applications Sequence[GetKubernetesClusterInstalledApplication]
    kubeconfig str
    A representation of the Kubernetes cluster's kubeconfig in yaml format
    kubernetes_version str
    The version of Kubernetes
    master_ip str
    The IP of the Kubernetes master node
    num_target_nodes int
    The size of the Kubernetes cluster

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    pools Sequence[GetKubernetesClusterPool]
    ready bool
    If the Kubernetes cluster is ready
    status str
    The status of Kubernetes cluster
    tags Sequence[str]
    A list of tags
    target_nodes_size str
    The size of each node

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    id str
    The ID of this resource.
    name str
    The name of the Kubernetes Cluster
    region str
    The region where cluster is running
    apiEndpoint String
    The base URL of the API server on the Kubernetes master node
    applications String
    A list of application installed
    cni String
    The cni for the k3s to install (the default is flannel) valid options are cilium or flannel
    createdAt String
    The date where the Kubernetes cluster was create
    dnsEntry String
    The unique dns entry for the cluster in this case point to the master
    installedApplications List<Property Map>
    kubeconfig String
    A representation of the Kubernetes cluster's kubeconfig in yaml format
    kubernetesVersion String
    The version of Kubernetes
    masterIp String
    The IP of the Kubernetes master node
    numTargetNodes Number
    The size of the Kubernetes cluster

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    pools List<Property Map>
    ready Boolean
    If the Kubernetes cluster is ready
    status String
    The status of Kubernetes cluster
    tags List<String>
    A list of tags
    targetNodesSize String
    The size of each node

    Deprecated: This field is deprecated and will be removed in a future version of the provider

    id String
    The ID of this resource.
    name String
    The name of the Kubernetes Cluster
    region String
    The region where cluster is running

    Supporting Types

    GetKubernetesClusterInstalledApplication

    Application string
    The name of the application
    Category string
    The category of the application
    Installed bool
    If the application is installed, this will return true
    Version string
    The version of the application
    Application string
    The name of the application
    Category string
    The category of the application
    Installed bool
    If the application is installed, this will return true
    Version string
    The version of the application
    application String
    The name of the application
    category String
    The category of the application
    installed Boolean
    If the application is installed, this will return true
    version String
    The version of the application
    application string
    The name of the application
    category string
    The category of the application
    installed boolean
    If the application is installed, this will return true
    version string
    The version of the application
    application str
    The name of the application
    category str
    The category of the application
    installed bool
    If the application is installed, this will return true
    version str
    The version of the application
    application String
    The name of the application
    category String
    The category of the application
    installed Boolean
    If the application is installed, this will return true
    version String
    The version of the application

    GetKubernetesClusterPool

    InstanceNames List<string>
    Instance names in the nodepool
    Label string
    Node pool label, if you don't provide one, we will generate one for you
    NodeCount int
    Number of nodes in the nodepool
    PublicIpNodePool bool
    Node pool belongs to the public ip node pool
    Size string
    Size of the nodes in the nodepool
    Labels Dictionary<string, string>
    Taints List<GetKubernetesClusterPoolTaint>
    InstanceNames []string
    Instance names in the nodepool
    Label string
    Node pool label, if you don't provide one, we will generate one for you
    NodeCount int
    Number of nodes in the nodepool
    PublicIpNodePool bool
    Node pool belongs to the public ip node pool
    Size string
    Size of the nodes in the nodepool
    Labels map[string]string
    Taints []GetKubernetesClusterPoolTaint
    instanceNames List<String>
    Instance names in the nodepool
    label String
    Node pool label, if you don't provide one, we will generate one for you
    nodeCount Integer
    Number of nodes in the nodepool
    publicIpNodePool Boolean
    Node pool belongs to the public ip node pool
    size String
    Size of the nodes in the nodepool
    labels Map<String,String>
    taints List<GetKubernetesClusterPoolTaint>
    instanceNames string[]
    Instance names in the nodepool
    label string
    Node pool label, if you don't provide one, we will generate one for you
    nodeCount number
    Number of nodes in the nodepool
    publicIpNodePool boolean
    Node pool belongs to the public ip node pool
    size string
    Size of the nodes in the nodepool
    labels {[key: string]: string}
    taints GetKubernetesClusterPoolTaint[]
    instance_names Sequence[str]
    Instance names in the nodepool
    label str
    Node pool label, if you don't provide one, we will generate one for you
    node_count int
    Number of nodes in the nodepool
    public_ip_node_pool bool
    Node pool belongs to the public ip node pool
    size str
    Size of the nodes in the nodepool
    labels Mapping[str, str]
    taints Sequence[GetKubernetesClusterPoolTaint]
    instanceNames List<String>
    Instance names in the nodepool
    label String
    Node pool label, if you don't provide one, we will generate one for you
    nodeCount Number
    Number of nodes in the nodepool
    publicIpNodePool Boolean
    Node pool belongs to the public ip node pool
    size String
    Size of the nodes in the nodepool
    labels Map<String>
    taints List<Property Map>

    GetKubernetesClusterPoolTaint

    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

    Package Details

    Repository
    Civo pulumi/pulumi-civo
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the civo Terraform Provider.
    civo logo
    Civo v2.4.6 published on Wednesday, Nov 6, 2024 by Pulumi