1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. vke
  6. Kubeconfig
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine

    Cluster Management Kubeconfig

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
    
    const vKEKubeconfigDemo = new volcenginecc.vke.Kubeconfig("VKEKubeconfigDemo", {
        clusterId: "cd****",
        type: "Private",
        validDuration: 2,
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    v_ke_kubeconfig_demo = volcenginecc.vke.Kubeconfig("VKEKubeconfigDemo",
        cluster_id="cd****",
        type="Private",
        valid_duration=2)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/vke"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vke.NewKubeconfig(ctx, "VKEKubeconfigDemo", &vke.KubeconfigArgs{
    			ClusterId:     pulumi.String("cd****"),
    			Type:          pulumi.String("Private"),
    			ValidDuration: pulumi.Int(2),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var vKEKubeconfigDemo = new Volcenginecc.Vke.Kubeconfig("VKEKubeconfigDemo", new()
        {
            ClusterId = "cd****",
            Type = "Private",
            ValidDuration = 2,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.volcengine.volcenginecc.vke.Kubeconfig;
    import com.volcengine.volcenginecc.vke.KubeconfigArgs;
    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) {
            var vKEKubeconfigDemo = new Kubeconfig("vKEKubeconfigDemo", KubeconfigArgs.builder()
                .clusterId("cd****")
                .type("Private")
                .validDuration(2)
                .build());
    
        }
    }
    
    resources:
      vKEKubeconfigDemo:
        type: volcenginecc:vke:Kubeconfig
        name: VKEKubeconfigDemo
        properties:
          clusterId: cd****
          type: Private
          validDuration: 2
    

    Create Kubeconfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Kubeconfig(name: string, args: KubeconfigArgs, opts?: CustomResourceOptions);
    @overload
    def Kubeconfig(resource_name: str,
                   args: KubeconfigArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Kubeconfig(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   cluster_id: Optional[str] = None,
                   type: Optional[str] = None,
                   valid_duration: Optional[int] = None)
    func NewKubeconfig(ctx *Context, name string, args KubeconfigArgs, opts ...ResourceOption) (*Kubeconfig, error)
    public Kubeconfig(string name, KubeconfigArgs args, CustomResourceOptions? opts = null)
    public Kubeconfig(String name, KubeconfigArgs args)
    public Kubeconfig(String name, KubeconfigArgs args, CustomResourceOptions options)
    
    type: volcenginecc:vke:Kubeconfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KubeconfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KubeconfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KubeconfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KubeconfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KubeconfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Kubeconfig Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Kubeconfig resource accepts the following input properties:

    ClusterId string
    Cluster ID
    Type string
    Cluster Kubeconfig File Type
    ValidDuration int
    Kubeconfig File Validity Period
    ClusterId string
    Cluster ID
    Type string
    Cluster Kubeconfig File Type
    ValidDuration int
    Kubeconfig File Validity Period
    clusterId String
    Cluster ID
    type String
    Cluster Kubeconfig File Type
    validDuration Integer
    Kubeconfig File Validity Period
    clusterId string
    Cluster ID
    type string
    Cluster Kubeconfig File Type
    validDuration number
    Kubeconfig File Validity Period
    cluster_id str
    Cluster ID
    type str
    Cluster Kubeconfig File Type
    valid_duration int
    Kubeconfig File Validity Period
    clusterId String
    Cluster ID
    type String
    Cluster Kubeconfig File Type
    validDuration Number
    Kubeconfig File Validity Period

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Kubeconfig resource produces the following output properties:

    CreateTime string
    Kubeconfig Creation Time
    ExpireTime string
    Kubeconfig Expiration Time
    Id string
    The provider-assigned unique ID for this managed resource.
    KubeconfigId string
    KubeconfigID。
    KubeconfigValue string
    Kubeconfig Text
    RoleId int
    Role ID
    UserId int
    User ID
    CreateTime string
    Kubeconfig Creation Time
    ExpireTime string
    Kubeconfig Expiration Time
    Id string
    The provider-assigned unique ID for this managed resource.
    Kubeconfig string
    Kubeconfig Text
    KubeconfigId string
    KubeconfigID。
    RoleId int
    Role ID
    UserId int
    User ID
    createTime String
    Kubeconfig Creation Time
    expireTime String
    Kubeconfig Expiration Time
    id String
    The provider-assigned unique ID for this managed resource.
    kubeconfig String
    Kubeconfig Text
    kubeconfigId String
    KubeconfigID。
    roleId Integer
    Role ID
    userId Integer
    User ID
    createTime string
    Kubeconfig Creation Time
    expireTime string
    Kubeconfig Expiration Time
    id string
    The provider-assigned unique ID for this managed resource.
    kubeconfig string
    Kubeconfig Text
    kubeconfigId string
    KubeconfigID。
    roleId number
    Role ID
    userId number
    User ID
    create_time str
    Kubeconfig Creation Time
    expire_time str
    Kubeconfig Expiration Time
    id str
    The provider-assigned unique ID for this managed resource.
    kubeconfig str
    Kubeconfig Text
    kubeconfig_id str
    KubeconfigID。
    role_id int
    Role ID
    user_id int
    User ID
    createTime String
    Kubeconfig Creation Time
    expireTime String
    Kubeconfig Expiration Time
    id String
    The provider-assigned unique ID for this managed resource.
    kubeconfig String
    Kubeconfig Text
    kubeconfigId String
    KubeconfigID。
    roleId Number
    Role ID
    userId Number
    User ID

    Look up Existing Kubeconfig Resource

    Get an existing Kubeconfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: KubeconfigState, opts?: CustomResourceOptions): Kubeconfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            create_time: Optional[str] = None,
            expire_time: Optional[str] = None,
            kubeconfig: Optional[str] = None,
            kubeconfig_id: Optional[str] = None,
            role_id: Optional[int] = None,
            type: Optional[str] = None,
            user_id: Optional[int] = None,
            valid_duration: Optional[int] = None) -> Kubeconfig
    func GetKubeconfig(ctx *Context, name string, id IDInput, state *KubeconfigState, opts ...ResourceOption) (*Kubeconfig, error)
    public static Kubeconfig Get(string name, Input<string> id, KubeconfigState? state, CustomResourceOptions? opts = null)
    public static Kubeconfig get(String name, Output<String> id, KubeconfigState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:vke:Kubeconfig    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterId string
    Cluster ID
    CreateTime string
    Kubeconfig Creation Time
    ExpireTime string
    Kubeconfig Expiration Time
    KubeconfigId string
    KubeconfigID。
    KubeconfigValue string
    Kubeconfig Text
    RoleId int
    Role ID
    Type string
    Cluster Kubeconfig File Type
    UserId int
    User ID
    ValidDuration int
    Kubeconfig File Validity Period
    ClusterId string
    Cluster ID
    CreateTime string
    Kubeconfig Creation Time
    ExpireTime string
    Kubeconfig Expiration Time
    Kubeconfig string
    Kubeconfig Text
    KubeconfigId string
    KubeconfigID。
    RoleId int
    Role ID
    Type string
    Cluster Kubeconfig File Type
    UserId int
    User ID
    ValidDuration int
    Kubeconfig File Validity Period
    clusterId String
    Cluster ID
    createTime String
    Kubeconfig Creation Time
    expireTime String
    Kubeconfig Expiration Time
    kubeconfig String
    Kubeconfig Text
    kubeconfigId String
    KubeconfigID。
    roleId Integer
    Role ID
    type String
    Cluster Kubeconfig File Type
    userId Integer
    User ID
    validDuration Integer
    Kubeconfig File Validity Period
    clusterId string
    Cluster ID
    createTime string
    Kubeconfig Creation Time
    expireTime string
    Kubeconfig Expiration Time
    kubeconfig string
    Kubeconfig Text
    kubeconfigId string
    KubeconfigID。
    roleId number
    Role ID
    type string
    Cluster Kubeconfig File Type
    userId number
    User ID
    validDuration number
    Kubeconfig File Validity Period
    cluster_id str
    Cluster ID
    create_time str
    Kubeconfig Creation Time
    expire_time str
    Kubeconfig Expiration Time
    kubeconfig str
    Kubeconfig Text
    kubeconfig_id str
    KubeconfigID。
    role_id int
    Role ID
    type str
    Cluster Kubeconfig File Type
    user_id int
    User ID
    valid_duration int
    Kubeconfig File Validity Period
    clusterId String
    Cluster ID
    createTime String
    Kubeconfig Creation Time
    expireTime String
    Kubeconfig Expiration Time
    kubeconfig String
    Kubeconfig Text
    kubeconfigId String
    KubeconfigID。
    roleId Number
    Role ID
    type String
    Cluster Kubeconfig File Type
    userId Number
    User ID
    validDuration Number
    Kubeconfig File Validity Period

    Import

    $ pulumi import volcenginecc:vke/kubeconfig:Kubeconfig example "cluster_id|kubeconfig_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.32
    published on Thursday, Apr 23, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.