get Kubernetes Version
suspend fun getKubernetesVersion(argument: GetKubernetesVersionPlainArgs): GetKubernetesVersionResult
This data source provides the details of the Kubernetes version supported by ACK.
NOTE: Available since v1.170.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Query the managed kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
const _default = alicloud.cs.getKubernetesVersion({
clusterType: "ManagedKubernetes",
kubernetesVersion: "1.22.3-aliyun.1",
profile: "Default",
});
export const metadata = _default.then(_default => _default.metadatas);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
# Query the managed kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
default = alicloud.cs.get_kubernetes_version(cluster_type="ManagedKubernetes",
kubernetes_version="1.22.3-aliyun.1",
profile="Default")
pulumi.export("metadata", default.metadatas)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Query the managed kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
{
ClusterType = "ManagedKubernetes",
KubernetesVersion = "1.22.3-aliyun.1",
Profile = "Default",
});
return new Dictionary<string, object?>
{
["metadata"] = @default.Apply(@default => @default.Apply(getKubernetesVersionResult => getKubernetesVersionResult.Metadatas)),
};
});
Content copied to clipboard
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 {
// Query the managed kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
ClusterType: "ManagedKubernetes",
KubernetesVersion: pulumi.StringRef("1.22.3-aliyun.1"),
Profile: pulumi.StringRef("Default"),
}, nil)
if err != nil {
return err
}
ctx.Export("metadata", _default.Metadatas)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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) {
// Query the managed kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
final var default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
.clusterType("ManagedKubernetes")
.kubernetesVersion("1.22.3-aliyun.1")
.profile("Default")
.build());
ctx.export("metadata", default_.metadatas());
}
}
Content copied to clipboard
variables:
# Query the managed kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
default:
fn::invoke:
function: alicloud:cs:getKubernetesVersion
arguments:
clusterType: ManagedKubernetes
kubernetesVersion: 1.22.3-aliyun.1
profile: Default
outputs:
metadata: ${default.metadatas}
Content copied to clipboard
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Query the kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
const _default = alicloud.cs.getKubernetesVersion({
clusterType: "Kubernetes",
kubernetesVersion: "1.22.3-aliyun.1",
profile: "Default",
});
export const metadata = _default.then(_default => _default.metadatas);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
# Query the kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
default = alicloud.cs.get_kubernetes_version(cluster_type="Kubernetes",
kubernetes_version="1.22.3-aliyun.1",
profile="Default")
pulumi.export("metadata", default.metadatas)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Query the kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
{
ClusterType = "Kubernetes",
KubernetesVersion = "1.22.3-aliyun.1",
Profile = "Default",
});
return new Dictionary<string, object?>
{
["metadata"] = @default.Apply(@default => @default.Apply(getKubernetesVersionResult => getKubernetesVersionResult.Metadatas)),
};
});
Content copied to clipboard
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 {
// Query the kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
ClusterType: "Kubernetes",
KubernetesVersion: pulumi.StringRef("1.22.3-aliyun.1"),
Profile: pulumi.StringRef("Default"),
}, nil)
if err != nil {
return err
}
ctx.Export("metadata", _default.Metadatas)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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) {
// Query the kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
final var default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
.clusterType("Kubernetes")
.kubernetesVersion("1.22.3-aliyun.1")
.profile("Default")
.build());
ctx.export("metadata", default_.metadatas());
}
}
Content copied to clipboard
variables:
# Query the kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
default:
fn::invoke:
function: alicloud:cs:getKubernetesVersion
arguments:
clusterType: Kubernetes
kubernetesVersion: 1.22.3-aliyun.1
profile: Default
outputs:
metadata: ${default.metadatas}
Content copied to clipboard
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Query the serverless kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
const _default = alicloud.cs.getKubernetesVersion({
clusterType: "ManagedKubernetes",
kubernetesVersion: "1.22.3-aliyun.1",
profile: "Serverless",
});
export const metadata = _default.then(_default => _default.metadatas);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
# Query the serverless kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
default = alicloud.cs.get_kubernetes_version(cluster_type="ManagedKubernetes",
kubernetes_version="1.22.3-aliyun.1",
profile="Serverless")
pulumi.export("metadata", default.metadatas)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Query the serverless kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
{
ClusterType = "ManagedKubernetes",
KubernetesVersion = "1.22.3-aliyun.1",
Profile = "Serverless",
});
return new Dictionary<string, object?>
{
["metadata"] = @default.Apply(@default => @default.Apply(getKubernetesVersionResult => getKubernetesVersionResult.Metadatas)),
};
});
Content copied to clipboard
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 {
// Query the serverless kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
ClusterType: "ManagedKubernetes",
KubernetesVersion: pulumi.StringRef("1.22.3-aliyun.1"),
Profile: pulumi.StringRef("Serverless"),
}, nil)
if err != nil {
return err
}
ctx.Export("metadata", _default.Metadatas)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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) {
// Query the serverless kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
final var default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
.clusterType("ManagedKubernetes")
.kubernetesVersion("1.22.3-aliyun.1")
.profile("Serverless")
.build());
ctx.export("metadata", default_.metadatas());
}
}
Content copied to clipboard
variables:
# Query the serverless kubernetes cluster metadata of version 1.22.3-aliyun.1 in the region specified by the client.
default:
fn::invoke:
function: alicloud:cs:getKubernetesVersion
arguments:
clusterType: ManagedKubernetes
kubernetesVersion: 1.22.3-aliyun.1
profile: Serverless
outputs:
metadata: ${default.metadatas}
Content copied to clipboard
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Query the edge kubernetes cluster metadata of version 1.20.11-aliyunedge.1 in the region specified by the client.
const _default = alicloud.cs.getKubernetesVersion({
clusterType: "ManagedKubernetes",
kubernetesVersion: "1.20.11-aliyunedge.1",
profile: "Edge",
});
export const metadata = _default.then(_default => _default.metadatas);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
# Query the edge kubernetes cluster metadata of version 1.20.11-aliyunedge.1 in the region specified by the client.
default = alicloud.cs.get_kubernetes_version(cluster_type="ManagedKubernetes",
kubernetes_version="1.20.11-aliyunedge.1",
profile="Edge")
pulumi.export("metadata", default.metadatas)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Query the edge kubernetes cluster metadata of version 1.20.11-aliyunedge.1 in the region specified by the client.
var @default = AliCloud.CS.GetKubernetesVersion.Invoke(new()
{
ClusterType = "ManagedKubernetes",
KubernetesVersion = "1.20.11-aliyunedge.1",
Profile = "Edge",
});
return new Dictionary<string, object?>
{
["metadata"] = @default.Apply(@default => @default.Apply(getKubernetesVersionResult => getKubernetesVersionResult.Metadatas)),
};
});
Content copied to clipboard
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 {
// Query the edge kubernetes cluster metadata of version 1.20.11-aliyunedge.1 in the region specified by the client.
_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
ClusterType: "ManagedKubernetes",
KubernetesVersion: pulumi.StringRef("1.20.11-aliyunedge.1"),
Profile: pulumi.StringRef("Edge"),
}, nil)
if err != nil {
return err
}
ctx.Export("metadata", _default.Metadatas)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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) {
// Query the edge kubernetes cluster metadata of version 1.20.11-aliyunedge.1 in the region specified by the client.
final var default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
.clusterType("ManagedKubernetes")
.kubernetesVersion("1.20.11-aliyunedge.1")
.profile("Edge")
.build());
ctx.export("metadata", default_.metadatas());
}
}
Content copied to clipboard
variables:
# Query the edge kubernetes cluster metadata of version 1.20.11-aliyunedge.1 in the region specified by the client.
default:
fn::invoke:
function: alicloud:cs:getKubernetesVersion
arguments:
clusterType: ManagedKubernetes
kubernetesVersion: 1.20.11-aliyunedge.1
profile: Edge
outputs:
metadata: ${default.metadatas}
Content copied to clipboard
Return
A collection of values returned by getKubernetesVersion.
Parameters
argument
A collection of arguments for invoking getKubernetesVersion.
suspend fun getKubernetesVersion(clusterType: String, kubernetesVersion: String? = null, profile: String? = null): GetKubernetesVersionResult
Return
A collection of values returned by getKubernetesVersion.
Parameters
cluster Type
The type of cluster. Its valid value are Kubernetes
and ManagedKubernetes
.
kubernetes Version
The ACK released kubernetes version.
profile
The profile of cluster. Its valid value are Default
, Serverless
, Edge
and Acs
.
See also
suspend fun getKubernetesVersion(argument: suspend GetKubernetesVersionPlainArgsBuilder.() -> Unit): GetKubernetesVersionResult
Return
A collection of values returned by getKubernetesVersion.
Parameters
argument
Builder for com.pulumi.alicloud.cs.kotlin.inputs.GetKubernetesVersionPlainArgs.