GetKubernetesCluster

Retrieves information about a DigitalOcean Kubernetes cluster for use in other resources. This data source provides all of the cluster’s properties as configured on your DigitalOcean account. This is useful if the cluster in question is not managed by this provider.

Using GetKubernetesCluster

function getKubernetesCluster(args: GetKubernetesClusterArgs, opts?: InvokeOptions): Promise<GetKubernetesClusterResult>
function  get_kubernetes_cluster(name=None, tags=None, opts=None)
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:

Name string

The name of Kubernetes cluster.

Tags List<string>

A list of tag names to be applied to the Kubernetes cluster.

Name string

The name of Kubernetes cluster.

Tags []string

A list of tag names to be applied to the Kubernetes cluster.

name string

The name of Kubernetes cluster.

tags string[]

A list of tag names to be applied to the Kubernetes cluster.

name str

The name of Kubernetes cluster.

tags List[str]

A list of tag names to be applied to the Kubernetes cluster.

GetKubernetesCluster Result

The following output properties are available:

ClusterSubnet string

The range of IP addresses in the overlay network of the Kubernetes cluster.

CreatedAt string

The date and time when the Kubernetes cluster was created.

Endpoint string

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

Id string

The provider-assigned unique ID for this managed resource.

Ipv4Address string

The public IPv4 address of the Kubernetes master node.

KubeConfigs List<Pulumi.DigitalOcean.Outputs.GetKubernetesClusterKubeConfig>
Name string
NodePools List<Pulumi.DigitalOcean.Outputs.GetKubernetesClusterNodePool>

A list of node pools associated with the cluster. Each node pool exports the following attributes: - id - The unique ID that can be used to identify and reference the node pool. - name - The name of the node pool. - size - The slug identifier for the type of Droplet used as workers in the node pool. - node_count - The number of Droplet instances in the node pool. - actual_node_count - The actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled. - auto_scale - A boolean indicating whether auto-scaling is enabled on the node pool. - min_nodes - If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to. - max_nodes - If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to. - tags - A list of tag names applied to the node pool. - labels - A map of key/value pairs applied to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources. - nodes - A list of nodes in the pool. Each node exports the following attributes: + id - A unique ID that can be used to identify and reference the node. + name - The auto-generated name for the node. + status - A string indicating the current status of the individual node. + created_at - The date and time when the node was created. + updated_at - The date and time when the node was last updated.

Region string

The slug identifier for the region where the Kubernetes cluster is located.

ServiceSubnet string

The range of assignable IP addresses for services running in the Kubernetes cluster.

Status string

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

UpdatedAt string

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

Version string

The slug identifier for the version of Kubernetes used for the cluster.

VpcUuid string

The ID of the VPC where the Kubernetes cluster is located.

Tags List<string>

A list of tag names to be applied to the Kubernetes cluster.

ClusterSubnet string

The range of IP addresses in the overlay network of the Kubernetes cluster.

CreatedAt string

The date and time when the Kubernetes cluster was created.

Endpoint string

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

Id string

The provider-assigned unique ID for this managed resource.

Ipv4Address string

The public IPv4 address of the Kubernetes master node.

KubeConfigs []GetKubernetesClusterKubeConfig
Name string
NodePools []GetKubernetesClusterNodePool

A list of node pools associated with the cluster. Each node pool exports the following attributes: - id - The unique ID that can be used to identify and reference the node pool. - name - The name of the node pool. - size - The slug identifier for the type of Droplet used as workers in the node pool. - node_count - The number of Droplet instances in the node pool. - actual_node_count - The actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled. - auto_scale - A boolean indicating whether auto-scaling is enabled on the node pool. - min_nodes - If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to. - max_nodes - If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to. - tags - A list of tag names applied to the node pool. - labels - A map of key/value pairs applied to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources. - nodes - A list of nodes in the pool. Each node exports the following attributes: + id - A unique ID that can be used to identify and reference the node. + name - The auto-generated name for the node. + status - A string indicating the current status of the individual node. + created_at - The date and time when the node was created. + updated_at - The date and time when the node was last updated.

Region string

The slug identifier for the region where the Kubernetes cluster is located.

ServiceSubnet string

The range of assignable IP addresses for services running in the Kubernetes cluster.

Status string

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

UpdatedAt string

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

Version string

The slug identifier for the version of Kubernetes used for the cluster.

VpcUuid string

The ID of the VPC where the Kubernetes cluster is located.

Tags []string

A list of tag names to be applied to the Kubernetes cluster.

clusterSubnet string

The range of IP addresses in the overlay network of the Kubernetes cluster.

createdAt string

The date and time when the Kubernetes cluster was created.

endpoint string

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

id string

The provider-assigned unique ID for this managed resource.

ipv4Address string

The public IPv4 address of the Kubernetes master node.

kubeConfigs GetKubernetesClusterKubeConfig[]
name string
nodePools GetKubernetesClusterNodePool[]

A list of node pools associated with the cluster. Each node pool exports the following attributes: - id - The unique ID that can be used to identify and reference the node pool. - name - The name of the node pool. - size - The slug identifier for the type of Droplet used as workers in the node pool. - node_count - The number of Droplet instances in the node pool. - actual_node_count - The actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled. - auto_scale - A boolean indicating whether auto-scaling is enabled on the node pool. - min_nodes - If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to. - max_nodes - If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to. - tags - A list of tag names applied to the node pool. - labels - A map of key/value pairs applied to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources. - nodes - A list of nodes in the pool. Each node exports the following attributes: + id - A unique ID that can be used to identify and reference the node. + name - The auto-generated name for the node. + status - A string indicating the current status of the individual node. + created_at - The date and time when the node was created. + updated_at - The date and time when the node was last updated.

region string

The slug identifier for the region where the Kubernetes cluster is located.

serviceSubnet string

The range of assignable IP addresses for services running in the Kubernetes cluster.

status string

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

updatedAt string

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

version string

The slug identifier for the version of Kubernetes used for the cluster.

vpcUuid string

The ID of the VPC where the Kubernetes cluster is located.

tags string[]

A list of tag names to be applied to the Kubernetes cluster.

cluster_subnet str

The range of IP addresses in the overlay network of the Kubernetes cluster.

created_at str

The date and time when the Kubernetes cluster was created.

endpoint str

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

id str

The provider-assigned unique ID for this managed resource.

ipv4_address str

The public IPv4 address of the Kubernetes master node.

kube_configs List[GetKubernetesClusterKubeConfig]
name str
node_pools List[GetKubernetesClusterNodePool]

A list of node pools associated with the cluster. Each node pool exports the following attributes: - id - The unique ID that can be used to identify and reference the node pool. - name - The name of the node pool. - size - The slug identifier for the type of Droplet used as workers in the node pool. - node_count - The number of Droplet instances in the node pool. - actual_node_count - The actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled. - auto_scale - A boolean indicating whether auto-scaling is enabled on the node pool. - min_nodes - If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to. - max_nodes - If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to. - tags - A list of tag names applied to the node pool. - labels - A map of key/value pairs applied to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources. - nodes - A list of nodes in the pool. Each node exports the following attributes: + id - A unique ID that can be used to identify and reference the node. + name - The auto-generated name for the node. + status - A string indicating the current status of the individual node. + created_at - The date and time when the node was created. + updated_at - The date and time when the node was last updated.

region str

The slug identifier for the region where the Kubernetes cluster is located.

service_subnet str

The range of assignable IP addresses for services running in the Kubernetes cluster.

status str

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

updated_at str

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

version str

The slug identifier for the version of Kubernetes used for the cluster.

vpc_uuid str

The ID of the VPC where the Kubernetes cluster is located.

tags List[str]

A list of tag names to be applied to the Kubernetes cluster.

Supporting Types

GetKubernetesClusterKubeConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ClientCertificate string
ClientKey string
ClusterCaCertificate string
ExpiresAt string
Host string
RawConfig string
Token string
ClientCertificate string
ClientKey string
ClusterCaCertificate string
ExpiresAt string
Host string
RawConfig string
Token string
clientCertificate string
clientKey string
clusterCaCertificate string
expiresAt string
host string
rawConfig string
token string
clientCertificate str
clientKey str
clusterCaCertificate str
expiresAt str
host str
rawConfig str
token str

GetKubernetesClusterNodePool

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ActualNodeCount int
AutoScale bool
Id string

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

Labels Dictionary<string, string>
MaxNodes int
MinNodes int
Name string

The name of Kubernetes cluster.

NodeCount int
Nodes List<Pulumi.DigitalOcean.Inputs.GetKubernetesClusterNodePoolNodeArgs>
Size string
Tags List<string>

A list of tag names to be applied to the Kubernetes cluster.

ActualNodeCount int
AutoScale bool
Id string

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

Labels map[string]string
MaxNodes int
MinNodes int
Name string

The name of Kubernetes cluster.

NodeCount int
Nodes []GetKubernetesClusterNodePoolNode
Size string
Tags []string

A list of tag names to be applied to the Kubernetes cluster.

actualNodeCount number
autoScale boolean
id string

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

labels {[key: string]: string}
maxNodes number
minNodes number
name string

The name of Kubernetes cluster.

nodeCount number
nodes GetKubernetesClusterNodePoolNode[]
size string
tags string[]

A list of tag names to be applied to the Kubernetes cluster.

actual_node_count float
auto_scale bool
id str

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

labels Dict[str, str]
max_nodes float
min_nodes float
name str

The name of Kubernetes cluster.

node_count float
nodes List[GetKubernetesClusterNodePoolNode]
size str
tags List[str]

A list of tag names to be applied to the Kubernetes cluster.

GetKubernetesClusterNodePoolNode

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CreatedAt string

The date and time when the Kubernetes cluster was created.

DropletId string
Id string

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

Name string

The name of Kubernetes cluster.

Status string

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

UpdatedAt string

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

CreatedAt string

The date and time when the Kubernetes cluster was created.

DropletId string
Id string

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

Name string

The name of Kubernetes cluster.

Status string

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

UpdatedAt string

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

createdAt string

The date and time when the Kubernetes cluster was created.

dropletId string
id string

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

name string

The name of Kubernetes cluster.

status string

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

updatedAt string

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

created_at str

The date and time when the Kubernetes cluster was created.

droplet_id str
id str

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

name str

The name of Kubernetes cluster.

status str

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

updated_at str

The date and time when the Kubernetes cluster was last updated. * kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes: - raw_config - The full contents of the Kubernetes cluster’s kubeconfig file. - host - The URL of the API server on the Kubernetes master node. - cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority. - token - The DigitalOcean API access token used by clients to access the cluster. - client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster. - expires_at - The date and time when the credentials will expire and need to be regenerated.

Package Details

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