selectel 7.2.0 published on Tuesday, Nov 18, 2025 by selectel
selectel 7.2.0 published on Tuesday, Nov 18, 2025 by selectel
Provides a kubeconfig file and its fields for a Managed Kubernetes cluster. For more information about Managed Kubernetes, see the official Selectel documentation.
Example Usage
Output kubeconfig
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
export = async () => {
const kubeconfig = await selectel.getMksKubeconfigV1({
clusterId: cluster1.id,
projectId: cluster1.projectId,
region: cluster1.region,
});
return {
kubeconfig: kubeconfig.rawConfig,
};
}
import pulumi
import pulumi_selectel as selectel
kubeconfig = selectel.get_mks_kubeconfig_v1(cluster_id=cluster1["id"],
project_id=cluster1["projectId"],
region=cluster1["region"])
pulumi.export("kubeconfig", kubeconfig.raw_config)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v7/selectel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
kubeconfig, err := selectel.GetMksKubeconfigV1(ctx, &selectel.GetMksKubeconfigV1Args{
ClusterId: cluster1.Id,
ProjectId: cluster1.ProjectId,
Region: cluster1.Region,
}, nil)
if err != nil {
return err
}
ctx.Export("kubeconfig", kubeconfig.RawConfig)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;
return await Deployment.RunAsync(() =>
{
var kubeconfig = Selectel.GetMksKubeconfigV1.Invoke(new()
{
ClusterId = cluster1.Id,
ProjectId = cluster1.ProjectId,
Region = cluster1.Region,
});
return new Dictionary<string, object?>
{
["kubeconfig"] = kubeconfig.Apply(getMksKubeconfigV1Result => getMksKubeconfigV1Result.RawConfig),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.SelectelFunctions;
import com.pulumi.selectel.inputs.GetMksKubeconfigV1Args;
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 kubeconfig = SelectelFunctions.getMksKubeconfigV1(GetMksKubeconfigV1Args.builder()
.clusterId(cluster1.id())
.projectId(cluster1.projectId())
.region(cluster1.region())
.build());
ctx.export("kubeconfig", kubeconfig.rawConfig());
}
}
variables:
kubeconfig:
fn::invoke:
function: selectel:getMksKubeconfigV1
arguments:
clusterId: ${cluster1.id}
projectId: ${cluster1.projectId}
region: ${cluster1.region}
outputs:
kubeconfig: ${kubeconfig.rawConfig}
Using a Kubernetes provider
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
export = async () => {
const kubeconfig = await selectel.getMksKubeconfigV1({
clusterId: cluster1.id,
projectId: cluster1.projectId,
region: cluster1.region,
});
return {
kubeconfig: kubeconfig.rawConfig,
};
}
import pulumi
import pulumi_selectel as selectel
kubeconfig = selectel.get_mks_kubeconfig_v1(cluster_id=cluster1["id"],
project_id=cluster1["projectId"],
region=cluster1["region"])
pulumi.export("kubeconfig", kubeconfig.raw_config)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v7/selectel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
kubeconfig, err := selectel.GetMksKubeconfigV1(ctx, &selectel.GetMksKubeconfigV1Args{
ClusterId: cluster1.Id,
ProjectId: cluster1.ProjectId,
Region: cluster1.Region,
}, nil)
if err != nil {
return err
}
ctx.Export("kubeconfig", kubeconfig.RawConfig)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;
return await Deployment.RunAsync(() =>
{
var kubeconfig = Selectel.GetMksKubeconfigV1.Invoke(new()
{
ClusterId = cluster1.Id,
ProjectId = cluster1.ProjectId,
Region = cluster1.Region,
});
return new Dictionary<string, object?>
{
["kubeconfig"] = kubeconfig.Apply(getMksKubeconfigV1Result => getMksKubeconfigV1Result.RawConfig),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.SelectelFunctions;
import com.pulumi.selectel.inputs.GetMksKubeconfigV1Args;
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 kubeconfig = SelectelFunctions.getMksKubeconfigV1(GetMksKubeconfigV1Args.builder()
.clusterId(cluster1.id())
.projectId(cluster1.projectId())
.region(cluster1.region())
.build());
ctx.export("kubeconfig", kubeconfig.rawConfig());
}
}
variables:
kubeconfig:
fn::invoke:
function: selectel:getMksKubeconfigV1
arguments:
clusterId: ${cluster1.id}
projectId: ${cluster1.projectId}
region: ${cluster1.region}
outputs:
kubeconfig: ${kubeconfig.rawConfig}
Using getMksKubeconfigV1
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 getMksKubeconfigV1(args: GetMksKubeconfigV1Args, opts?: InvokeOptions): Promise<GetMksKubeconfigV1Result>
function getMksKubeconfigV1Output(args: GetMksKubeconfigV1OutputArgs, opts?: InvokeOptions): Output<GetMksKubeconfigV1Result>def get_mks_kubeconfig_v1(cluster_id: Optional[str] = None,
id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMksKubeconfigV1Result
def get_mks_kubeconfig_v1_output(cluster_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMksKubeconfigV1Result]func GetMksKubeconfigV1(ctx *Context, args *GetMksKubeconfigV1Args, opts ...InvokeOption) (*GetMksKubeconfigV1Result, error)
func GetMksKubeconfigV1Output(ctx *Context, args *GetMksKubeconfigV1OutputArgs, opts ...InvokeOption) GetMksKubeconfigV1ResultOutput> Note: This function is named GetMksKubeconfigV1 in the Go SDK.
public static class GetMksKubeconfigV1
{
public static Task<GetMksKubeconfigV1Result> InvokeAsync(GetMksKubeconfigV1Args args, InvokeOptions? opts = null)
public static Output<GetMksKubeconfigV1Result> Invoke(GetMksKubeconfigV1InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMksKubeconfigV1Result> getMksKubeconfigV1(GetMksKubeconfigV1Args args, InvokeOptions options)
public static Output<GetMksKubeconfigV1Result> getMksKubeconfigV1(GetMksKubeconfigV1Args args, InvokeOptions options)
fn::invoke:
function: selectel:index/getMksKubeconfigV1:getMksKubeconfigV1
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Id string - Unique identifier of the cluster.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where the cluster is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - Id string
- Cluster
Id string - Unique identifier of the cluster.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where the cluster is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - Id string
- cluster
Id String - Unique identifier of the cluster.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where the cluster is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - id String
- cluster
Id string - Unique identifier of the cluster.
- project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region string
- Pool where the cluster is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - id string
- cluster_
id str - Unique identifier of the cluster.
- project_
id str - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region str
- Pool where the cluster is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - id str
- cluster
Id String - Unique identifier of the cluster.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where the cluster is located, for example,
ru-3. Learn more about available pools in the Availability matrix. - id String
getMksKubeconfigV1 Result
The following output properties are available:
- Client
Cert string - Client certificate for authorization.
- Client
Key string - Client key for authorization.
- Cluster
Ca stringCert - CA certificate of the cluster.
- Cluster
Id string - Id string
- Project
Id string - Raw
Config string - Raw content of a kubeconfig file.
- Region string
- Server string
- IP address and port for a Kube API server.
- Client
Cert string - Client certificate for authorization.
- Client
Key string - Client key for authorization.
- Cluster
Ca stringCert - CA certificate of the cluster.
- Cluster
Id string - Id string
- Project
Id string - Raw
Config string - Raw content of a kubeconfig file.
- Region string
- Server string
- IP address and port for a Kube API server.
- client
Cert String - Client certificate for authorization.
- client
Key String - Client key for authorization.
- cluster
Ca StringCert - CA certificate of the cluster.
- cluster
Id String - id String
- project
Id String - raw
Config String - Raw content of a kubeconfig file.
- region String
- server String
- IP address and port for a Kube API server.
- client
Cert string - Client certificate for authorization.
- client
Key string - Client key for authorization.
- cluster
Ca stringCert - CA certificate of the cluster.
- cluster
Id string - id string
- project
Id string - raw
Config string - Raw content of a kubeconfig file.
- region string
- server string
- IP address and port for a Kube API server.
- client_
cert str - Client certificate for authorization.
- client_
key str - Client key for authorization.
- cluster_
ca_ strcert - CA certificate of the cluster.
- cluster_
id str - id str
- project_
id str - raw_
config str - Raw content of a kubeconfig file.
- region str
- server str
- IP address and port for a Kube API server.
- client
Cert String - Client certificate for authorization.
- client
Key String - Client key for authorization.
- cluster
Ca StringCert - CA certificate of the cluster.
- cluster
Id String - id String
- project
Id String - raw
Config String - Raw content of a kubeconfig file.
- region String
- server String
- IP address and port for a Kube API server.
Package Details
- Repository
- selectel selectel/terraform-provider-selectel
- License
- Notes
- This Pulumi package is based on the
selectelTerraform Provider.
selectel 7.2.0 published on Tuesday, Nov 18, 2025 by selectel
