The Automation API is now available. No CLI. No human-in-the-loop. Just your code. Learn More

GetKubernetesCluster

Provides a Civo Kubernetes cluster data source.

Note: This data source returns a single kubernetes cluster. When specifying a name, an error is triggered if more than one kubernetes Cluster is found.

Example Usage

using Pulumi;
using Civo = Pulumi.Civo;

class MyStack : Stack
{
    public MyStack()
    {
        var my_cluster = Output.Create(Civo.GetKubernetesCluster.InvokeAsync(new Civo.GetKubernetesClusterArgs
        {
            Name = "my-super-cluster",
        }));
        this.KubernetesClusterOutput = my_cluster.Apply(my_cluster => my_cluster.MasterIp);
    }

    [Output("kubernetesClusterOutput")]
    public Output<string> KubernetesClusterOutput { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-civo/sdk/go/civo"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "my-super-cluster"
        my_cluster, err := civo.LookupKubernetesCluster(ctx, &civo.LookupKubernetesClusterArgs{
            Name: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("kubernetesClusterOutput", my_cluster.MasterIp)
        return nil
    })
}
import pulumi
import pulumi_civo as civo

my_cluster = civo.get_kubernetes_cluster(name="my-super-cluster")
pulumi.export("kubernetesClusterOutput", my_cluster.master_ip)
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);

Using GetKubernetesCluster

function getKubernetesCluster(args: GetKubernetesClusterArgs, opts?: InvokeOptions): Promise<GetKubernetesClusterResult>
def get_kubernetes_cluster(id: Optional[str] = None, name: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetKubernetesClusterResult
func LookupKubernetesCluster(ctx *Context, args *LookupKubernetesClusterArgs, opts ...InvokeOption) (*LookupKubernetesClusterResult, error)

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

public static class GetKubernetesCluster {
    public static Task<GetKubernetesClusterResult> InvokeAsync(GetKubernetesClusterArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id string

The ID of the kubernetes Cluster

Name string

The name of the kubernetes Cluster.

Id string

The ID of the kubernetes Cluster

Name string

The name of the kubernetes Cluster.

id string

The ID of the kubernetes Cluster

name string

The name of the kubernetes Cluster.

id str

The ID of the kubernetes Cluster

name str

The name of the kubernetes Cluster.

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.

BuiltAt string

The date where the Kubernetes cluster was build.

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>

A unique ID that can be used to identify and reference a Kubernetes cluster.

Instances List<GetKubernetesClusterInstance>

In addition to the arguments provided, these additional attributes about the cluster’s default node instance are exported.

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.

Ready bool
Status string

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

Tags string

The tag of the instances

TargetNodesSize string

The size of each node.

Id string

A unique ID that can be used to identify and reference a Kubernetes cluster.

Name string

The name of your cluster,.

ApiEndpoint string

The base URL of the API server on the Kubernetes master node.

Applications string

A list of application installed.

BuiltAt string

The date where the Kubernetes cluster was build.

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

A unique ID that can be used to identify and reference a Kubernetes cluster.

Instances []GetKubernetesClusterInstance

In addition to the arguments provided, these additional attributes about the cluster’s default node instance are exported.

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.

Ready bool
Status string

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

Tags string

The tag of the instances

TargetNodesSize string

The size of each node.

Id string

A unique ID that can be used to identify and reference a Kubernetes cluster.

Name string

The name of your cluster,.

apiEndpoint string

The base URL of the API server on the Kubernetes master node.

applications string

A list of application installed.

builtAt string

The date where the Kubernetes cluster was build.

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[]

A unique ID that can be used to identify and reference a Kubernetes cluster.

instances GetKubernetesClusterInstance[]

In addition to the arguments provided, these additional attributes about the cluster’s default node instance are exported.

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.

ready boolean
status string

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

tags string

The tag of the instances

targetNodesSize string

The size of each node.

id string

A unique ID that can be used to identify and reference a Kubernetes cluster.

name string

The name of your cluster,.

api_endpoint str

The base URL of the API server on the Kubernetes master node.

applications str

A list of application installed.

built_at str

The date where the Kubernetes cluster was build.

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]

A unique ID that can be used to identify and reference a Kubernetes cluster.

instances Sequence[GetKubernetesClusterInstance]

In addition to the arguments provided, these additional attributes about the cluster’s default node instance are exported.

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.

ready bool
status str

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

tags str

The tag of the instances

target_nodes_size str

The size of each node.

id str

A unique ID that can be used to identify and reference a Kubernetes cluster.

name str

The name of your cluster,.

Supporting Types

GetKubernetesClusterInstalledApplication

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Application string

The name of the application

Category string

The category of the application

Installed bool

if installed or not

Version string

The version of the application

Application string

The name of the application

Category string

The category of the application

Installed bool

if installed or not

Version string

The version of the application

application string

The name of the application

category string

The category of the application

installed boolean

if installed or not

version string

The version of the application

application str

The name of the application

category str

The category of the application

installed bool

if installed or not

version str

The version of the application

GetKubernetesClusterInstance

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CpuCores int

Total cpu of the inatance.

CreatedAt string

The date where the Kubernetes cluster was create.

DiskGb int

The size of the disk.

FirewallId string

The firewall id assigned to the instance

Hostname string

The hostname of the instance.

PublicIp string

The public ip of the instances, only available if the instances is the master

RamMb int

Total ram of the instance

Region string

The region where instance are.

Size string

The size of the instance.

Status string

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

Tags List<string>

The tag of the instances

CpuCores int

Total cpu of the inatance.

CreatedAt string

The date where the Kubernetes cluster was create.

DiskGb int

The size of the disk.

FirewallId string

The firewall id assigned to the instance

Hostname string

The hostname of the instance.

PublicIp string

The public ip of the instances, only available if the instances is the master

RamMb int

Total ram of the instance

Region string

The region where instance are.

Size string

The size of the instance.

Status string

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

Tags []string

The tag of the instances

cpuCores number

Total cpu of the inatance.

createdAt string

The date where the Kubernetes cluster was create.

diskGb number

The size of the disk.

firewallId string

The firewall id assigned to the instance

hostname string

The hostname of the instance.

publicIp string

The public ip of the instances, only available if the instances is the master

ramMb number

Total ram of the instance

region string

The region where instance are.

size string

The size of the instance.

status string

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

tags string[]

The tag of the instances

cpu_cores int

Total cpu of the inatance.

created_at str

The date where the Kubernetes cluster was create.

disk_gb int

The size of the disk.

firewall_id str

The firewall id assigned to the instance

hostname str

The hostname of the instance.

public_ip str

The public ip of the instances, only available if the instances is the master

ram_mb int

Total ram of the instance

region str

The region where instance are.

size str

The size of the instance.

status str

The status of Kubernetes cluster. * ready -If the Kubernetes cluster is ready.

tags Sequence[str]

The tag of the instances

Package Details

Repository
https://github.com/pulumi/pulumi-civo
License
Apache-2.0
Notes
This Pulumi package is based on the civo Terraform Provider.