Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.19.0 published on Friday, Mar 18, 2022 by Pulumi

getKubernetesClusters

This data source provides a list Container Service Kubernetes Clusters on Alibaba Cloud.

NOTE: Available in v1.34.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var k8sClusters = Output.Create(AliCloud.CS.GetKubernetesClusters.InvokeAsync(new AliCloud.CS.GetKubernetesClustersArgs
        {
            NameRegex = "my-first-k8s",
            OutputFile = "my-first-k8s-json",
        }));
        this.Output = k8sClusters.Apply(k8sClusters => k8sClusters.Clusters);
    }

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

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		k8sClusters, err := cs.GetKubernetesClusters(ctx, &cs.GetKubernetesClustersArgs{
			NameRegex:  pulumi.StringRef("my-first-k8s"),
			OutputFile: pulumi.StringRef("my-first-k8s-json"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("output", k8sClusters.Clusters)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

k8s_clusters = alicloud.cs.get_kubernetes_clusters(name_regex="my-first-k8s",
    output_file="my-first-k8s-json")
pulumi.export("output", k8s_clusters.clusters)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Declare the data source
const k8sClusters = pulumi.output(alicloud.cs.getKubernetesClusters({
    nameRegex: "my-first-k8s",
    outputFile: "my-first-k8s-json",
}));

export const output = k8sClusters.clusters;

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?: InvokeOptions): Output<GetKubernetesClustersResult>
def get_kubernetes_clusters(enable_details: Optional[bool] = None,
                            ids: Optional[Sequence[str]] = None,
                            name_regex: Optional[str] = None,
                            output_file: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetKubernetesClustersResult
def get_kubernetes_clusters_output(enable_details: Optional[pulumi.Input[bool]] = None,
                            ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            name_regex: Optional[pulumi.Input[str]] = None,
                            output_file: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = 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 CompletableFuture<GetKubernetesClustersResult> getKubernetesClusters(GetKubernetesClustersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:cs/getKubernetesClusters:getKubernetesClusters
  Arguments:
    # Arguments dictionary

The following arguments are supported:

EnableDetails bool
Ids List<string>

Cluster IDs to filter.

NameRegex string

A regex string to filter results by cluster name.

OutputFile string
EnableDetails bool
Ids []string

Cluster IDs to filter.

NameRegex string

A regex string to filter results by cluster name.

OutputFile string
enableDetails Boolean
ids List<String>

Cluster IDs to filter.

nameRegex String

A regex string to filter results by cluster name.

outputFile String
enableDetails boolean
ids string[]

Cluster IDs to filter.

nameRegex string

A regex string to filter results by cluster name.

outputFile string
enable_details bool
ids Sequence[str]

Cluster IDs to filter.

name_regex str

A regex string to filter results by cluster name.

output_file str
enableDetails Boolean
ids List<String>

Cluster IDs to filter.

nameRegex String

A regex string to filter results by cluster name.

outputFile String

getKubernetesClusters Result

The following output properties are available:

Clusters List<Pulumi.AliCloud.CS.Outputs.GetKubernetesClustersCluster>

A list of matched Kubernetes clusters. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of matched Kubernetes clusters' ids.

Names List<string>

A list of matched Kubernetes clusters' names.

EnableDetails bool
NameRegex string
OutputFile string
Clusters []GetKubernetesClustersCluster

A list of matched Kubernetes clusters. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of matched Kubernetes clusters' ids.

Names []string

A list of matched Kubernetes clusters' names.

EnableDetails bool
NameRegex string
OutputFile string
clusters List<GetKubernetesClustersCluster>

A list of matched Kubernetes clusters. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of matched Kubernetes clusters' ids.

names List<String>

A list of matched Kubernetes clusters' names.

enableDetails Boolean
nameRegex String
outputFile String
clusters GetKubernetesClustersCluster[]

A list of matched Kubernetes clusters. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of matched Kubernetes clusters' ids.

names string[]

A list of matched Kubernetes clusters' names.

enableDetails boolean
nameRegex string
outputFile string
clusters Sequence[GetKubernetesClustersCluster]

A list of matched Kubernetes clusters. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of matched Kubernetes clusters' ids.

names Sequence[str]

A list of matched Kubernetes clusters' names.

enable_details bool
name_regex str
output_file str
clusters List<Property Map>

A list of matched Kubernetes clusters. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of matched Kubernetes clusters' ids.

names List<String>

A list of matched Kubernetes clusters' names.

enableDetails Boolean
nameRegex String
outputFile String

Supporting Types

GetKubernetesClustersCluster

AvailabilityZone string

The ID of availability zone.

ClusterNetworkType string
Connections Pulumi.AliCloud.CS.Inputs.GetKubernetesClustersClusterConnections

Map of kubernetes cluster connection information. It contains several attributes to Block Connections.

Id string

ID of the node.

ImageId string

The ID of node image.

KeyName string

The keypair of ssh login cluster node, you have to create it first.

LogConfigs List<Pulumi.AliCloud.CS.Inputs.GetKubernetesClustersClusterLogConfig>

A list of one element containing information about the associated log store. It contains the following attributes:

MasterAutoRenew bool
MasterAutoRenewPeriod int
MasterDiskCategory string

The system disk category of master node.

MasterDiskSize int

The system disk size of master node.

MasterInstanceChargeType string
MasterInstanceTypes List<string>

The instance type of master node.

MasterNodes List<Pulumi.AliCloud.CS.Inputs.GetKubernetesClustersClusterMasterNode>

List of cluster master nodes. It contains several attributes to Block Nodes.

MasterPeriod int
MasterPeriodUnit string
Name string

Node name.

NatGatewayId string

The ID of nat gateway used to launch kubernetes cluster.

NodeCidrMask int

The network mask used on pods for each node.

PodCidr string
SecurityGroupId string

The ID of security group where the current cluster worker node is located.

ServiceCidr string
SlbInternetEnabled bool

Whether internet load balancer for API Server is created

VpcId string

The ID of VPC where the current cluster is located.

VswitchIds List<string>

The ID of VSwitches where the current cluster is located.

WorkerAutoRenew bool
WorkerAutoRenewPeriod int
WorkerDataDiskCategory string

The data disk size of worker node.

WorkerDataDiskSize int

The data disk category of worker node.

WorkerDiskCategory string

The system disk category of worker node.

WorkerDiskSize int

The system disk size of worker node.

WorkerInstanceChargeType string
WorkerInstanceTypes List<string>

The instance type of worker node.

WorkerNodes List<Pulumi.AliCloud.CS.Inputs.GetKubernetesClustersClusterWorkerNode>

List of cluster worker nodes. It contains several attributes to Block Nodes.

WorkerNumbers List<int>

The ECS instance node number in the current container cluster.

WorkerPeriod int
WorkerPeriodUnit string
AvailabilityZone string

The ID of availability zone.

ClusterNetworkType string
Connections GetKubernetesClustersClusterConnections

Map of kubernetes cluster connection information. It contains several attributes to Block Connections.

Id string

ID of the node.

ImageId string

The ID of node image.

KeyName string

The keypair of ssh login cluster node, you have to create it first.

LogConfigs []GetKubernetesClustersClusterLogConfig

A list of one element containing information about the associated log store. It contains the following attributes:

MasterAutoRenew bool
MasterAutoRenewPeriod int
MasterDiskCategory string

The system disk category of master node.

MasterDiskSize int

The system disk size of master node.

MasterInstanceChargeType string
MasterInstanceTypes []string

The instance type of master node.

MasterNodes []GetKubernetesClustersClusterMasterNode

List of cluster master nodes. It contains several attributes to Block Nodes.

MasterPeriod int
MasterPeriodUnit string
Name string

Node name.

NatGatewayId string

The ID of nat gateway used to launch kubernetes cluster.

NodeCidrMask int

The network mask used on pods for each node.

PodCidr string
SecurityGroupId string

The ID of security group where the current cluster worker node is located.

ServiceCidr string
SlbInternetEnabled bool

Whether internet load balancer for API Server is created

VpcId string

The ID of VPC where the current cluster is located.

VswitchIds []string

The ID of VSwitches where the current cluster is located.

WorkerAutoRenew bool
WorkerAutoRenewPeriod int
WorkerDataDiskCategory string

The data disk size of worker node.

WorkerDataDiskSize int

The data disk category of worker node.

WorkerDiskCategory string

The system disk category of worker node.

WorkerDiskSize int

The system disk size of worker node.

WorkerInstanceChargeType string
WorkerInstanceTypes []string

The instance type of worker node.

WorkerNodes []GetKubernetesClustersClusterWorkerNode

List of cluster worker nodes. It contains several attributes to Block Nodes.

WorkerNumbers []int

The ECS instance node number in the current container cluster.

WorkerPeriod int
WorkerPeriodUnit string
availabilityZone String

The ID of availability zone.

clusterNetworkType String
connections GetKubernetesClustersClusterConnections

Map of kubernetes cluster connection information. It contains several attributes to Block Connections.

id String

ID of the node.

imageId String

The ID of node image.

keyName String

The keypair of ssh login cluster node, you have to create it first.

logConfigs List<GetKubernetesClustersClusterLogConfig>

A list of one element containing information about the associated log store. It contains the following attributes:

masterAutoRenew Boolean
masterAutoRenewPeriod Integer
masterDiskCategory String

The system disk category of master node.

masterDiskSize Integer

The system disk size of master node.

masterInstanceChargeType String
masterInstanceTypes List<String>

The instance type of master node.

masterNodes List<GetKubernetesClustersClusterMasterNode>

List of cluster master nodes. It contains several attributes to Block Nodes.

masterPeriod Integer
masterPeriodUnit String
name String

Node name.

natGatewayId String

The ID of nat gateway used to launch kubernetes cluster.

nodeCidrMask Integer

The network mask used on pods for each node.

podCidr String
securityGroupId String

The ID of security group where the current cluster worker node is located.

serviceCidr String
slbInternetEnabled Boolean

Whether internet load balancer for API Server is created

vpcId String

The ID of VPC where the current cluster is located.

vswitchIds List<String>

The ID of VSwitches where the current cluster is located.

workerAutoRenew Boolean
workerAutoRenewPeriod Integer
workerDataDiskCategory String

The data disk size of worker node.

workerDataDiskSize Integer

The data disk category of worker node.

workerDiskCategory String

The system disk category of worker node.

workerDiskSize Integer

The system disk size of worker node.

workerInstanceChargeType String
workerInstanceTypes List<String>

The instance type of worker node.

workerNodes List<GetKubernetesClustersClusterWorkerNode>

List of cluster worker nodes. It contains several attributes to Block Nodes.

workerNumbers List<Integer>

The ECS instance node number in the current container cluster.

workerPeriod Integer
workerPeriodUnit String
availabilityZone string

The ID of availability zone.

clusterNetworkType string
connections GetKubernetesClustersClusterConnections

Map of kubernetes cluster connection information. It contains several attributes to Block Connections.

id string

ID of the node.

imageId string

The ID of node image.

keyName string

The keypair of ssh login cluster node, you have to create it first.

logConfigs GetKubernetesClustersClusterLogConfig[]

A list of one element containing information about the associated log store. It contains the following attributes:

masterAutoRenew boolean
masterAutoRenewPeriod number
masterDiskCategory string

The system disk category of master node.

masterDiskSize number

The system disk size of master node.

masterInstanceChargeType string
masterInstanceTypes string[]

The instance type of master node.

masterNodes GetKubernetesClustersClusterMasterNode[]

List of cluster master nodes. It contains several attributes to Block Nodes.

masterPeriod number
masterPeriodUnit string
name string

Node name.

natGatewayId string

The ID of nat gateway used to launch kubernetes cluster.

nodeCidrMask number

The network mask used on pods for each node.

podCidr string
securityGroupId string

The ID of security group where the current cluster worker node is located.

serviceCidr string
slbInternetEnabled boolean

Whether internet load balancer for API Server is created

vpcId string

The ID of VPC where the current cluster is located.

vswitchIds string[]

The ID of VSwitches where the current cluster is located.

workerAutoRenew boolean
workerAutoRenewPeriod number
workerDataDiskCategory string

The data disk size of worker node.

workerDataDiskSize number

The data disk category of worker node.

workerDiskCategory string

The system disk category of worker node.

workerDiskSize number

The system disk size of worker node.

workerInstanceChargeType string
workerInstanceTypes string[]

The instance type of worker node.

workerNodes GetKubernetesClustersClusterWorkerNode[]

List of cluster worker nodes. It contains several attributes to Block Nodes.

workerNumbers number[]

The ECS instance node number in the current container cluster.

workerPeriod number
workerPeriodUnit string
availability_zone str

The ID of availability zone.

cluster_network_type str
connections GetKubernetesClustersClusterConnections

Map of kubernetes cluster connection information. It contains several attributes to Block Connections.

id str

ID of the node.

image_id str

The ID of node image.

key_name str

The keypair of ssh login cluster node, you have to create it first.

log_configs Sequence[GetKubernetesClustersClusterLogConfig]

A list of one element containing information about the associated log store. It contains the following attributes:

master_auto_renew bool
master_auto_renew_period int
master_disk_category str

The system disk category of master node.

master_disk_size int

The system disk size of master node.

master_instance_charge_type str
master_instance_types Sequence[str]

The instance type of master node.

master_nodes Sequence[GetKubernetesClustersClusterMasterNode]

List of cluster master nodes. It contains several attributes to Block Nodes.

master_period int
master_period_unit str
name str

Node name.

nat_gateway_id str

The ID of nat gateway used to launch kubernetes cluster.

node_cidr_mask int

The network mask used on pods for each node.

pod_cidr str
security_group_id str

The ID of security group where the current cluster worker node is located.

service_cidr str
slb_internet_enabled bool

Whether internet load balancer for API Server is created

vpc_id str

The ID of VPC where the current cluster is located.

vswitch_ids Sequence[str]

The ID of VSwitches where the current cluster is located.

worker_auto_renew bool
worker_auto_renew_period int
worker_data_disk_category str

The data disk size of worker node.

worker_data_disk_size int

The data disk category of worker node.

worker_disk_category str

The system disk category of worker node.

worker_disk_size int

The system disk size of worker node.

worker_instance_charge_type str
worker_instance_types Sequence[str]

The instance type of worker node.

worker_nodes Sequence[GetKubernetesClustersClusterWorkerNode]

List of cluster worker nodes. It contains several attributes to Block Nodes.

worker_numbers Sequence[int]

The ECS instance node number in the current container cluster.

worker_period int
worker_period_unit str
availabilityZone String

The ID of availability zone.

clusterNetworkType String
connections Property Map

Map of kubernetes cluster connection information. It contains several attributes to Block Connections.

id String

ID of the node.

imageId String

The ID of node image.

keyName String

The keypair of ssh login cluster node, you have to create it first.

logConfigs List<Property Map>

A list of one element containing information about the associated log store. It contains the following attributes:

masterAutoRenew Boolean
masterAutoRenewPeriod Number
masterDiskCategory String

The system disk category of master node.

masterDiskSize Number

The system disk size of master node.

masterInstanceChargeType String
masterInstanceTypes List<String>

The instance type of master node.

masterNodes List<Property Map>

List of cluster master nodes. It contains several attributes to Block Nodes.

masterPeriod Number
masterPeriodUnit String
name String

Node name.

natGatewayId String

The ID of nat gateway used to launch kubernetes cluster.

nodeCidrMask Number

The network mask used on pods for each node.

podCidr String
securityGroupId String

The ID of security group where the current cluster worker node is located.

serviceCidr String
slbInternetEnabled Boolean

Whether internet load balancer for API Server is created

vpcId String

The ID of VPC where the current cluster is located.

vswitchIds List<String>

The ID of VSwitches where the current cluster is located.

workerAutoRenew Boolean
workerAutoRenewPeriod Number
workerDataDiskCategory String

The data disk size of worker node.

workerDataDiskSize Number

The data disk category of worker node.

workerDiskCategory String

The system disk category of worker node.

workerDiskSize Number

The system disk size of worker node.

workerInstanceChargeType String
workerInstanceTypes List<String>

The instance type of worker node.

workerNodes List<Property Map>

List of cluster worker nodes. It contains several attributes to Block Nodes.

workerNumbers List<Number>

The ECS instance node number in the current container cluster.

workerPeriod Number
workerPeriodUnit String

GetKubernetesClustersClusterConnections

ApiServerInternet string

API Server Internet endpoint.

ApiServerIntranet string

API Server Intranet endpoint.

MasterPublicIp string

Master node SSH IP address.

ServiceDomain string

Service Access Domain.

ApiServerInternet string

API Server Internet endpoint.

ApiServerIntranet string

API Server Intranet endpoint.

MasterPublicIp string

Master node SSH IP address.

ServiceDomain string

Service Access Domain.

apiServerInternet String

API Server Internet endpoint.

apiServerIntranet String

API Server Intranet endpoint.

masterPublicIp String

Master node SSH IP address.

serviceDomain String

Service Access Domain.

apiServerInternet string

API Server Internet endpoint.

apiServerIntranet string

API Server Intranet endpoint.

masterPublicIp string

Master node SSH IP address.

serviceDomain string

Service Access Domain.

api_server_internet str

API Server Internet endpoint.

api_server_intranet str

API Server Intranet endpoint.

master_public_ip str

Master node SSH IP address.

service_domain str

Service Access Domain.

apiServerInternet String

API Server Internet endpoint.

apiServerIntranet String

API Server Intranet endpoint.

masterPublicIp String

Master node SSH IP address.

serviceDomain String

Service Access Domain.

GetKubernetesClustersClusterLogConfig

Project string

Log Service project name.

Type string

Type of collecting logs.

Project string

Log Service project name.

Type string

Type of collecting logs.

project String

Log Service project name.

type String

Type of collecting logs.

project string

Log Service project name.

type string

Type of collecting logs.

project str

Log Service project name.

type str

Type of collecting logs.

project String

Log Service project name.

type String

Type of collecting logs.

GetKubernetesClustersClusterMasterNode

Id string

ID of the node.

Name string

Node name.

PrivateIp string

The private IP address of node.

Id string

ID of the node.

Name string

Node name.

PrivateIp string

The private IP address of node.

id String

ID of the node.

name String

Node name.

privateIp String

The private IP address of node.

id string

ID of the node.

name string

Node name.

privateIp string

The private IP address of node.

id str

ID of the node.

name str

Node name.

private_ip str

The private IP address of node.

id String

ID of the node.

name String

Node name.

privateIp String

The private IP address of node.

GetKubernetesClustersClusterWorkerNode

Id string

ID of the node.

Name string

Node name.

PrivateIp string

The private IP address of node.

Id string

ID of the node.

Name string

Node name.

PrivateIp string

The private IP address of node.

id String

ID of the node.

name String

Node name.

privateIp String

The private IP address of node.

id string

ID of the node.

name string

Node name.

privateIp string

The private IP address of node.

id str

ID of the node.

name str

Node name.

private_ip str

The private IP address of node.

id String

ID of the node.

name String

Node name.

privateIp String

The private IP address of node.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.