civo 1.1.5 published on Thursday, Feb 6, 2025 by civo
civo.getKubernetesCluster
Explore with Pulumi AI
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-terraform-provider/sdks/go/civo/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)
public static Output<GetKubernetesClusterResult> getKubernetesCluster(GetKubernetesClusterArgs args, InvokeOptions options)
fn::invoke:
function: civo:index/getKubernetesCluster:getKubernetesCluster
arguments:
# arguments dictionary
The following arguments are supported:
getKubernetesCluster Result
The following output properties are available:
- Api
Endpoint 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 arecilium
orflannel
- Created
At string - The date where the Kubernetes cluster was create
- Dns
Entry string - The unique dns entry for the cluster in this case point to the master
- Installed
Applications List<GetKubernetes Cluster Installed Application> - Kubeconfig string
- A representation of the Kubernetes cluster's kubeconfig in yaml format
- Kubernetes
Version string - The version of Kubernetes
- Master
Ip string - The IP of the Kubernetes master node
- Num
Target doubleNodes - The size of the Kubernetes cluster
- Pools
List<Get
Kubernetes Cluster Pool> - Ready bool
- If the Kubernetes cluster is ready
- Status string
- The status of Kubernetes cluster
- List<string>
- A list of tags
- Target
Nodes stringSize - The size of each node
- 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 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 arecilium
orflannel
- Created
At string - The date where the Kubernetes cluster was create
- Dns
Entry string - The unique dns entry for the cluster in this case point to the master
- Installed
Applications []GetKubernetes Cluster Installed Application - Kubeconfig string
- A representation of the Kubernetes cluster's kubeconfig in yaml format
- Kubernetes
Version string - The version of Kubernetes
- Master
Ip string - The IP of the Kubernetes master node
- Num
Target float64Nodes - The size of the Kubernetes cluster
- Pools
[]Get
Kubernetes Cluster Pool - Ready bool
- If the Kubernetes cluster is ready
- Status string
- The status of Kubernetes cluster
- []string
- A list of tags
- Target
Nodes stringSize - The size of each node
- 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 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 arecilium
orflannel
- created
At String - The date where the Kubernetes cluster was create
- dns
Entry String - The unique dns entry for the cluster in this case point to the master
- installed
Applications List<GetKubernetes Cluster Installed Application> - kubeconfig String
- A representation of the Kubernetes cluster's kubeconfig in yaml format
- kubernetes
Version String - The version of Kubernetes
- master
Ip String - The IP of the Kubernetes master node
- num
Target DoubleNodes - The size of the Kubernetes cluster
- pools
List<Get
Kubernetes Cluster Pool> - ready Boolean
- If the Kubernetes cluster is ready
- status String
- The status of Kubernetes cluster
- List<String>
- A list of tags
- target
Nodes StringSize - The size of each node
- 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 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 arecilium
orflannel
- created
At string - The date where the Kubernetes cluster was create
- dns
Entry string - The unique dns entry for the cluster in this case point to the master
- installed
Applications GetKubernetes Cluster Installed Application[] - kubeconfig string
- A representation of the Kubernetes cluster's kubeconfig in yaml format
- kubernetes
Version string - The version of Kubernetes
- master
Ip string - The IP of the Kubernetes master node
- num
Target numberNodes - The size of the Kubernetes cluster
- pools
Get
Kubernetes Cluster Pool[] - ready boolean
- If the Kubernetes cluster is ready
- status string
- The status of Kubernetes cluster
- string[]
- A list of tags
- target
Nodes stringSize - The size of each node
- 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 arecilium
orflannel
- 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[GetKubernetes Cluster Installed Application] - 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_ floatnodes - The size of the Kubernetes cluster
- pools
Sequence[Get
Kubernetes Cluster Pool] - ready bool
- If the Kubernetes cluster is ready
- status str
- The status of Kubernetes cluster
- Sequence[str]
- A list of tags
- target_
nodes_ strsize - The size of each node
- id str
- The ID of this resource.
- name str
- The name of the Kubernetes Cluster
- region str
- The region where cluster is running
- api
Endpoint 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 arecilium
orflannel
- created
At String - The date where the Kubernetes cluster was create
- dns
Entry String - The unique dns entry for the cluster in this case point to the master
- installed
Applications List<Property Map> - kubeconfig String
- A representation of the Kubernetes cluster's kubeconfig in yaml format
- kubernetes
Version String - The version of Kubernetes
- master
Ip String - The IP of the Kubernetes master node
- num
Target NumberNodes - The size of the Kubernetes cluster
- pools List<Property Map>
- ready Boolean
- If the Kubernetes cluster is ready
- status String
- The status of Kubernetes cluster
- List<String>
- A list of tags
- target
Nodes StringSize - The size of each node
- 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
This property is required. string - Category
This property is required. string - Installed
This property is required. bool - Version
This property is required. string
- Application
This property is required. string - Category
This property is required. string - Installed
This property is required. bool - Version
This property is required. string
- application
This property is required. String - category
This property is required. String - installed
This property is required. Boolean - version
This property is required. String
- application
This property is required. string - category
This property is required. string - installed
This property is required. boolean - version
This property is required. string
- application
This property is required. str - category
This property is required. str - installed
This property is required. bool - version
This property is required. str
- application
This property is required. String - category
This property is required. String - installed
This property is required. Boolean - version
This property is required. String
GetKubernetesClusterPool
- Instance
Names This property is required. List<string> - Label
This property is required. string - Labels
This property is required. Dictionary<string, string> - Node
Count This property is required. double - Public
Ip Node Pool This property is required. bool - Size
This property is required. string - Taints
This property is required. List<GetKubernetes Cluster Pool Taint>
- Instance
Names This property is required. []string - Label
This property is required. string - Labels
This property is required. map[string]string - Node
Count This property is required. float64 - Public
Ip Node Pool This property is required. bool - Size
This property is required. string - Taints
This property is required. []GetKubernetes Cluster Pool Taint
- instance
Names This property is required. List<String> - label
This property is required. String - labels
This property is required. Map<String,String> - node
Count This property is required. Double - public
Ip Node Pool This property is required. Boolean - size
This property is required. String - taints
This property is required. List<GetKubernetes Cluster Pool Taint>
- instance
Names This property is required. string[] - label
This property is required. string - labels
This property is required. {[key: string]: string} - node
Count This property is required. number - public
Ip Node Pool This property is required. boolean - size
This property is required. string - taints
This property is required. GetKubernetes Cluster Pool Taint[]
- instance_
names This property is required. Sequence[str] - label
This property is required. str - labels
This property is required. Mapping[str, str] - node_
count This property is required. float - public_
ip_ node_ pool This property is required. bool - size
This property is required. str - taints
This property is required. Sequence[GetKubernetes Cluster Pool Taint]
- instance
Names This property is required. List<String> - label
This property is required. String - labels
This property is required. Map<String> - node
Count This property is required. Number - public
Ip Node Pool This property is required. Boolean - size
This property is required. String - taints
This property is required. List<Property Map>
GetKubernetesClusterPoolTaint
Package Details
- Repository
- Civo civo/terraform-provider-civo
- License
- Notes
- This Pulumi package is based on the
civo
Terraform Provider.