volcengine.vke.Node
Explore with Pulumi AI
Provides a resource to manage vke node
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooSecurityGroup = new Volcengine.Vpc.SecurityGroup("fooSecurityGroup", new()
{
SecurityGroupName = "acc-test-security-group",
VpcId = fooVpc.Id,
});
var fooImages = Volcengine.Ecs.Images.Invoke(new()
{
NameRegex = "veLinux 1.0 CentOS兼容版 64位",
});
var fooCluster = new Volcengine.Vke.Cluster("fooCluster", new()
{
Description = "created by terraform",
DeleteProtectionEnabled = false,
ClusterConfig = new Volcengine.Vke.Inputs.ClusterClusterConfigArgs
{
SubnetIds = new[]
{
fooSubnet.Id,
},
ApiServerPublicAccessEnabled = true,
ApiServerPublicAccessConfig = new Volcengine.Vke.Inputs.ClusterClusterConfigApiServerPublicAccessConfigArgs
{
PublicAccessNetworkConfig = new Volcengine.Vke.Inputs.ClusterClusterConfigApiServerPublicAccessConfigPublicAccessNetworkConfigArgs
{
BillingType = "PostPaidByBandwidth",
Bandwidth = 1,
},
},
ResourcePublicAccessDefaultEnabled = true,
},
PodsConfig = new Volcengine.Vke.Inputs.ClusterPodsConfigArgs
{
PodNetworkMode = "VpcCniShared",
VpcCniConfig = new Volcengine.Vke.Inputs.ClusterPodsConfigVpcCniConfigArgs
{
SubnetIds = new[]
{
fooSubnet.Id,
},
},
},
ServicesConfig = new Volcengine.Vke.Inputs.ClusterServicesConfigArgs
{
ServiceCidrsv4s = new[]
{
"172.30.0.0/18",
},
},
Tags = new[]
{
new Volcengine.Vke.Inputs.ClusterTagArgs
{
Key = "tf-k1",
Value = "tf-v1",
},
},
});
var fooNodePool = new Volcengine.Vke.NodePool("fooNodePool", new()
{
ClusterId = fooCluster.Id,
AutoScaling = new Volcengine.Vke.Inputs.NodePoolAutoScalingArgs
{
Enabled = false,
},
NodeConfig = new Volcengine.Vke.Inputs.NodePoolNodeConfigArgs
{
InstanceTypeIds = new[]
{
"ecs.g1ie.xlarge",
},
SubnetIds = new[]
{
fooSubnet.Id,
},
ImageId = .Where(image => image.ImageName == "veLinux 1.0 CentOS兼容版 64位").Select(image =>
{
return image.ImageId;
})[0],
SystemVolume = new Volcengine.Vke.Inputs.NodePoolNodeConfigSystemVolumeArgs
{
Type = "ESSD_PL0",
Size = 50,
},
DataVolumes = new[]
{
new Volcengine.Vke.Inputs.NodePoolNodeConfigDataVolumeArgs
{
Type = "ESSD_PL0",
Size = 50,
MountPoint = "/tf",
},
},
InitializeScript = "ZWNobyBoZWxsbyB0ZXJyYWZvcm0h",
Security = new Volcengine.Vke.Inputs.NodePoolNodeConfigSecurityArgs
{
Login = new Volcengine.Vke.Inputs.NodePoolNodeConfigSecurityLoginArgs
{
Password = "UHdkMTIzNDU2",
},
SecurityStrategies = new[]
{
"Hids",
},
SecurityGroupIds = new[]
{
fooSecurityGroup.Id,
},
},
AdditionalContainerStorageEnabled = true,
InstanceChargeType = "PostPaid",
NamePrefix = "acc-test",
EcsTags = new[]
{
new Volcengine.Vke.Inputs.NodePoolNodeConfigEcsTagArgs
{
Key = "ecs_k1",
Value = "ecs_v1",
},
},
},
KubernetesConfig = new Volcengine.Vke.Inputs.NodePoolKubernetesConfigArgs
{
Labels = new[]
{
new Volcengine.Vke.Inputs.NodePoolKubernetesConfigLabelArgs
{
Key = "label1",
Value = "value1",
},
},
Taints = new[]
{
new Volcengine.Vke.Inputs.NodePoolKubernetesConfigTaintArgs
{
Key = "taint-key/node-type",
Value = "taint-value",
Effect = "NoSchedule",
},
},
Cordon = true,
},
Tags = new[]
{
new Volcengine.Vke.Inputs.NodePoolTagArgs
{
Key = "node-pool-k1",
Value = "node-pool-v1",
},
},
});
var fooInstance = new Volcengine.Ecs.Instance("fooInstance", new()
{
InstanceName = "acc-test-ecs",
HostName = "tf-acc-test",
ImageId = .Where(image => image.ImageName == "veLinux 1.0 CentOS兼容版 64位").Select(image =>
{
return image.ImageId;
})[0],
InstanceType = "ecs.g1ie.xlarge",
Password = "93f0cb0614Aab12",
InstanceChargeType = "PostPaid",
SystemVolumeType = "ESSD_PL0",
SystemVolumeSize = 50,
DataVolumes = new[]
{
new Volcengine.Ecs.Inputs.InstanceDataVolumeArgs
{
VolumeType = "ESSD_PL0",
Size = 50,
DeleteWithInstance = true,
},
},
SubnetId = fooSubnet.Id,
SecurityGroupIds = new[]
{
fooSecurityGroup.Id,
},
ProjectName = "default",
Tags = new[]
{
new Volcengine.Ecs.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooNode = new Volcengine.Vke.Node("fooNode", new()
{
ClusterId = fooCluster.Id,
InstanceId = fooInstance.Id,
NodePoolId = fooNodePool.Id,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vke"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooSecurityGroup, err := vpc.NewSecurityGroup(ctx, "fooSecurityGroup", &vpc.SecurityGroupArgs{
SecurityGroupName: pulumi.String("acc-test-security-group"),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooImages, err := ecs.Images(ctx, &ecs.ImagesArgs{
NameRegex: pulumi.StringRef("veLinux 1.0 CentOS兼容版 64位"),
}, nil)
if err != nil {
return err
}
fooCluster, err := vke.NewCluster(ctx, "fooCluster", &vke.ClusterArgs{
Description: pulumi.String("created by terraform"),
DeleteProtectionEnabled: pulumi.Bool(false),
ClusterConfig: &vke.ClusterClusterConfigArgs{
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
ApiServerPublicAccessEnabled: pulumi.Bool(true),
ApiServerPublicAccessConfig: &vke.ClusterClusterConfigApiServerPublicAccessConfigArgs{
PublicAccessNetworkConfig: &vke.ClusterClusterConfigApiServerPublicAccessConfigPublicAccessNetworkConfigArgs{
BillingType: pulumi.String("PostPaidByBandwidth"),
Bandwidth: pulumi.Int(1),
},
},
ResourcePublicAccessDefaultEnabled: pulumi.Bool(true),
},
PodsConfig: &vke.ClusterPodsConfigArgs{
PodNetworkMode: pulumi.String("VpcCniShared"),
VpcCniConfig: &vke.ClusterPodsConfigVpcCniConfigArgs{
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
},
},
ServicesConfig: &vke.ClusterServicesConfigArgs{
ServiceCidrsv4s: pulumi.StringArray{
pulumi.String("172.30.0.0/18"),
},
},
Tags: vke.ClusterTagArray{
&vke.ClusterTagArgs{
Key: pulumi.String("tf-k1"),
Value: pulumi.String("tf-v1"),
},
},
})
if err != nil {
return err
}
fooNodePool, err := vke.NewNodePool(ctx, "fooNodePool", &vke.NodePoolArgs{
ClusterId: fooCluster.ID(),
AutoScaling: &vke.NodePoolAutoScalingArgs{
Enabled: pulumi.Bool(false),
},
NodeConfig: &vke.NodePoolNodeConfigArgs{
InstanceTypeIds: pulumi.StringArray{
pulumi.String("ecs.g1ie.xlarge"),
},
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
ImageId: "TODO: For expression"[0],
SystemVolume: &vke.NodePoolNodeConfigSystemVolumeArgs{
Type: pulumi.String("ESSD_PL0"),
Size: pulumi.Int(50),
},
DataVolumes: vke.NodePoolNodeConfigDataVolumeArray{
&vke.NodePoolNodeConfigDataVolumeArgs{
Type: pulumi.String("ESSD_PL0"),
Size: pulumi.Int(50),
MountPoint: pulumi.String("/tf"),
},
},
InitializeScript: pulumi.String("ZWNobyBoZWxsbyB0ZXJyYWZvcm0h"),
Security: &vke.NodePoolNodeConfigSecurityArgs{
Login: &vke.NodePoolNodeConfigSecurityLoginArgs{
Password: pulumi.String("UHdkMTIzNDU2"),
},
SecurityStrategies: pulumi.StringArray{
pulumi.String("Hids"),
},
SecurityGroupIds: pulumi.StringArray{
fooSecurityGroup.ID(),
},
},
AdditionalContainerStorageEnabled: pulumi.Bool(true),
InstanceChargeType: pulumi.String("PostPaid"),
NamePrefix: pulumi.String("acc-test"),
EcsTags: vke.NodePoolNodeConfigEcsTagArray{
&vke.NodePoolNodeConfigEcsTagArgs{
Key: pulumi.String("ecs_k1"),
Value: pulumi.String("ecs_v1"),
},
},
},
KubernetesConfig: &vke.NodePoolKubernetesConfigArgs{
Labels: vke.NodePoolKubernetesConfigLabelArray{
&vke.NodePoolKubernetesConfigLabelArgs{
Key: pulumi.String("label1"),
Value: pulumi.String("value1"),
},
},
Taints: vke.NodePoolKubernetesConfigTaintArray{
&vke.NodePoolKubernetesConfigTaintArgs{
Key: pulumi.String("taint-key/node-type"),
Value: pulumi.String("taint-value"),
Effect: pulumi.String("NoSchedule"),
},
},
Cordon: pulumi.Bool(true),
},
Tags: vke.NodePoolTagArray{
&vke.NodePoolTagArgs{
Key: pulumi.String("node-pool-k1"),
Value: pulumi.String("node-pool-v1"),
},
},
})
if err != nil {
return err
}
fooInstance, err := ecs.NewInstance(ctx, "fooInstance", &ecs.InstanceArgs{
InstanceName: pulumi.String("acc-test-ecs"),
HostName: pulumi.String("tf-acc-test"),
ImageId: "TODO: For expression"[0],
InstanceType: pulumi.String("ecs.g1ie.xlarge"),
Password: pulumi.String("93f0cb0614Aab12"),
InstanceChargeType: pulumi.String("PostPaid"),
SystemVolumeType: pulumi.String("ESSD_PL0"),
SystemVolumeSize: pulumi.Int(50),
DataVolumes: ecs.InstanceDataVolumeArray{
&ecs.InstanceDataVolumeArgs{
VolumeType: pulumi.String("ESSD_PL0"),
Size: pulumi.Int(50),
DeleteWithInstance: pulumi.Bool(true),
},
},
SubnetId: fooSubnet.ID(),
SecurityGroupIds: pulumi.StringArray{
fooSecurityGroup.ID(),
},
ProjectName: pulumi.String("default"),
Tags: ecs.InstanceTagArray{
&ecs.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
_, err = vke.NewNode(ctx, "fooNode", &vke.NodeArgs{
ClusterId: fooCluster.ID(),
InstanceId: fooInstance.ID(),
NodePoolId: fooNodePool.ID(),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_security_group = volcengine.vpc.SecurityGroup("fooSecurityGroup",
security_group_name="acc-test-security-group",
vpc_id=foo_vpc.id)
foo_images = volcengine.ecs.images(name_regex="veLinux 1.0 CentOS兼容版 64位")
foo_cluster = volcengine.vke.Cluster("fooCluster",
description="created by terraform",
delete_protection_enabled=False,
cluster_config=volcengine.vke.ClusterClusterConfigArgs(
subnet_ids=[foo_subnet.id],
api_server_public_access_enabled=True,
api_server_public_access_config=volcengine.vke.ClusterClusterConfigApiServerPublicAccessConfigArgs(
public_access_network_config=volcengine.vke.ClusterClusterConfigApiServerPublicAccessConfigPublicAccessNetworkConfigArgs(
billing_type="PostPaidByBandwidth",
bandwidth=1,
),
),
resource_public_access_default_enabled=True,
),
pods_config=volcengine.vke.ClusterPodsConfigArgs(
pod_network_mode="VpcCniShared",
vpc_cni_config=volcengine.vke.ClusterPodsConfigVpcCniConfigArgs(
subnet_ids=[foo_subnet.id],
),
),
services_config=volcengine.vke.ClusterServicesConfigArgs(
service_cidrsv4s=["172.30.0.0/18"],
),
tags=[volcengine.vke.ClusterTagArgs(
key="tf-k1",
value="tf-v1",
)])
foo_node_pool = volcengine.vke.NodePool("fooNodePool",
cluster_id=foo_cluster.id,
auto_scaling=volcengine.vke.NodePoolAutoScalingArgs(
enabled=False,
),
node_config=volcengine.vke.NodePoolNodeConfigArgs(
instance_type_ids=["ecs.g1ie.xlarge"],
subnet_ids=[foo_subnet.id],
image_id=[image.image_id for image in foo_images.images if image.image_name == "veLinux 1.0 CentOS兼容版 64位"][0],
system_volume=volcengine.vke.NodePoolNodeConfigSystemVolumeArgs(
type="ESSD_PL0",
size=50,
),
data_volumes=[volcengine.vke.NodePoolNodeConfigDataVolumeArgs(
type="ESSD_PL0",
size=50,
mount_point="/tf",
)],
initialize_script="ZWNobyBoZWxsbyB0ZXJyYWZvcm0h",
security=volcengine.vke.NodePoolNodeConfigSecurityArgs(
login=volcengine.vke.NodePoolNodeConfigSecurityLoginArgs(
password="UHdkMTIzNDU2",
),
security_strategies=["Hids"],
security_group_ids=[foo_security_group.id],
),
additional_container_storage_enabled=True,
instance_charge_type="PostPaid",
name_prefix="acc-test",
ecs_tags=[volcengine.vke.NodePoolNodeConfigEcsTagArgs(
key="ecs_k1",
value="ecs_v1",
)],
),
kubernetes_config=volcengine.vke.NodePoolKubernetesConfigArgs(
labels=[volcengine.vke.NodePoolKubernetesConfigLabelArgs(
key="label1",
value="value1",
)],
taints=[volcengine.vke.NodePoolKubernetesConfigTaintArgs(
key="taint-key/node-type",
value="taint-value",
effect="NoSchedule",
)],
cordon=True,
),
tags=[volcengine.vke.NodePoolTagArgs(
key="node-pool-k1",
value="node-pool-v1",
)])
foo_instance = volcengine.ecs.Instance("fooInstance",
instance_name="acc-test-ecs",
host_name="tf-acc-test",
image_id=[image.image_id for image in foo_images.images if image.image_name == "veLinux 1.0 CentOS兼容版 64位"][0],
instance_type="ecs.g1ie.xlarge",
password="93f0cb0614Aab12",
instance_charge_type="PostPaid",
system_volume_type="ESSD_PL0",
system_volume_size=50,
data_volumes=[volcengine.ecs.InstanceDataVolumeArgs(
volume_type="ESSD_PL0",
size=50,
delete_with_instance=True,
)],
subnet_id=foo_subnet.id,
security_group_ids=[foo_security_group.id],
project_name="default",
tags=[volcengine.ecs.InstanceTagArgs(
key="k1",
value="v1",
)])
foo_node = volcengine.vke.Node("fooNode",
cluster_id=foo_cluster.id,
instance_id=foo_instance.id,
node_pool_id=foo_node_pool.id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
securityGroupName: "acc-test-security-group",
vpcId: fooVpc.id,
});
const fooImages = volcengine.ecs.Images({
nameRegex: "veLinux 1.0 CentOS兼容版 64位",
});
const fooCluster = new volcengine.vke.Cluster("fooCluster", {
description: "created by terraform",
deleteProtectionEnabled: false,
clusterConfig: {
subnetIds: [fooSubnet.id],
apiServerPublicAccessEnabled: true,
apiServerPublicAccessConfig: {
publicAccessNetworkConfig: {
billingType: "PostPaidByBandwidth",
bandwidth: 1,
},
},
resourcePublicAccessDefaultEnabled: true,
},
podsConfig: {
podNetworkMode: "VpcCniShared",
vpcCniConfig: {
subnetIds: [fooSubnet.id],
},
},
servicesConfig: {
serviceCidrsv4s: ["172.30.0.0/18"],
},
tags: [{
key: "tf-k1",
value: "tf-v1",
}],
});
const fooNodePool = new volcengine.vke.NodePool("fooNodePool", {
clusterId: fooCluster.id,
autoScaling: {
enabled: false,
},
nodeConfig: {
instanceTypeIds: ["ecs.g1ie.xlarge"],
subnetIds: [fooSubnet.id],
imageId: fooImages.then(fooImages => .filter(image => image.imageName == "veLinux 1.0 CentOS兼容版 64位").map(image => (image.imageId))[0]),
systemVolume: {
type: "ESSD_PL0",
size: 50,
},
dataVolumes: [{
type: "ESSD_PL0",
size: 50,
mountPoint: "/tf",
}],
initializeScript: "ZWNobyBoZWxsbyB0ZXJyYWZvcm0h",
security: {
login: {
password: "UHdkMTIzNDU2",
},
securityStrategies: ["Hids"],
securityGroupIds: [fooSecurityGroup.id],
},
additionalContainerStorageEnabled: true,
instanceChargeType: "PostPaid",
namePrefix: "acc-test",
ecsTags: [{
key: "ecs_k1",
value: "ecs_v1",
}],
},
kubernetesConfig: {
labels: [{
key: "label1",
value: "value1",
}],
taints: [{
key: "taint-key/node-type",
value: "taint-value",
effect: "NoSchedule",
}],
cordon: true,
},
tags: [{
key: "node-pool-k1",
value: "node-pool-v1",
}],
});
const fooInstance = new volcengine.ecs.Instance("fooInstance", {
instanceName: "acc-test-ecs",
hostName: "tf-acc-test",
imageId: fooImages.then(fooImages => .filter(image => image.imageName == "veLinux 1.0 CentOS兼容版 64位").map(image => (image.imageId))[0]),
instanceType: "ecs.g1ie.xlarge",
password: "93f0cb0614Aab12",
instanceChargeType: "PostPaid",
systemVolumeType: "ESSD_PL0",
systemVolumeSize: 50,
dataVolumes: [{
volumeType: "ESSD_PL0",
size: 50,
deleteWithInstance: true,
}],
subnetId: fooSubnet.id,
securityGroupIds: [fooSecurityGroup.id],
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooNode = new volcengine.vke.Node("fooNode", {
clusterId: fooCluster.id,
instanceId: fooInstance.id,
nodePoolId: fooNodePool.id,
});
Coming soon!
Create Node Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Node(name: string, args: NodeArgs, opts?: CustomResourceOptions);
@overload
def Node(resource_name: str,
args: NodeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Node(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
instance_id: Optional[str] = None,
additional_container_storage_enabled: Optional[bool] = None,
client_token: Optional[str] = None,
container_storage_path: Optional[str] = None,
image_id: Optional[str] = None,
initialize_script: Optional[str] = None,
keep_instance_name: Optional[bool] = None,
kubernetes_config: Optional[NodeKubernetesConfigArgs] = None,
node_pool_id: Optional[str] = None)
func NewNode(ctx *Context, name string, args NodeArgs, opts ...ResourceOption) (*Node, error)
public Node(string name, NodeArgs args, CustomResourceOptions? opts = null)
type: volcengine:vke:Node
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 NodeArgs
- 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 NodeArgs
- 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 NodeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NodeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var nodeResource = new Volcengine.Vke.Node("nodeResource", new()
{
ClusterId = "string",
InstanceId = "string",
AdditionalContainerStorageEnabled = false,
ClientToken = "string",
ContainerStoragePath = "string",
ImageId = "string",
InitializeScript = "string",
KeepInstanceName = false,
KubernetesConfig = new Volcengine.Vke.Inputs.NodeKubernetesConfigArgs
{
Cordon = false,
Labels = new[]
{
new Volcengine.Vke.Inputs.NodeKubernetesConfigLabelArgs
{
Key = "string",
Value = "string",
},
},
Taints = new[]
{
new Volcengine.Vke.Inputs.NodeKubernetesConfigTaintArgs
{
Effect = "string",
Key = "string",
Value = "string",
},
},
},
NodePoolId = "string",
});
example, err := vke.NewNode(ctx, "nodeResource", &vke.NodeArgs{
ClusterId: pulumi.String("string"),
InstanceId: pulumi.String("string"),
AdditionalContainerStorageEnabled: pulumi.Bool(false),
ClientToken: pulumi.String("string"),
ContainerStoragePath: pulumi.String("string"),
ImageId: pulumi.String("string"),
InitializeScript: pulumi.String("string"),
KeepInstanceName: pulumi.Bool(false),
KubernetesConfig: &vke.NodeKubernetesConfigArgs{
Cordon: pulumi.Bool(false),
Labels: vke.NodeKubernetesConfigLabelArray{
&vke.NodeKubernetesConfigLabelArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Taints: vke.NodeKubernetesConfigTaintArray{
&vke.NodeKubernetesConfigTaintArgs{
Effect: pulumi.String("string"),
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
NodePoolId: pulumi.String("string"),
})
var nodeResource = new Node("nodeResource", NodeArgs.builder()
.clusterId("string")
.instanceId("string")
.additionalContainerStorageEnabled(false)
.clientToken("string")
.containerStoragePath("string")
.imageId("string")
.initializeScript("string")
.keepInstanceName(false)
.kubernetesConfig(NodeKubernetesConfigArgs.builder()
.cordon(false)
.labels(NodeKubernetesConfigLabelArgs.builder()
.key("string")
.value("string")
.build())
.taints(NodeKubernetesConfigTaintArgs.builder()
.effect("string")
.key("string")
.value("string")
.build())
.build())
.nodePoolId("string")
.build());
node_resource = volcengine.vke.Node("nodeResource",
cluster_id="string",
instance_id="string",
additional_container_storage_enabled=False,
client_token="string",
container_storage_path="string",
image_id="string",
initialize_script="string",
keep_instance_name=False,
kubernetes_config=volcengine.vke.NodeKubernetesConfigArgs(
cordon=False,
labels=[volcengine.vke.NodeKubernetesConfigLabelArgs(
key="string",
value="string",
)],
taints=[volcengine.vke.NodeKubernetesConfigTaintArgs(
effect="string",
key="string",
value="string",
)],
),
node_pool_id="string")
const nodeResource = new volcengine.vke.Node("nodeResource", {
clusterId: "string",
instanceId: "string",
additionalContainerStorageEnabled: false,
clientToken: "string",
containerStoragePath: "string",
imageId: "string",
initializeScript: "string",
keepInstanceName: false,
kubernetesConfig: {
cordon: false,
labels: [{
key: "string",
value: "string",
}],
taints: [{
effect: "string",
key: "string",
value: "string",
}],
},
nodePoolId: "string",
});
type: volcengine:vke:Node
properties:
additionalContainerStorageEnabled: false
clientToken: string
clusterId: string
containerStoragePath: string
imageId: string
initializeScript: string
instanceId: string
keepInstanceName: false
kubernetesConfig:
cordon: false
labels:
- key: string
value: string
taints:
- effect: string
key: string
value: string
nodePoolId: string
Node Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Node resource accepts the following input properties:
- Cluster
Id string - The cluster id.
- Instance
Id string - The instance id.
- Additional
Container boolStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - Client
Token string - The client token.
- Container
Storage stringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- Image
Id string - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- Initialize
Script string - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- Keep
Instance boolName - The flag of keep instance name, the value is
true
orfalse
. - Kubernetes
Config NodeKubernetes Config - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- Node
Pool stringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- Cluster
Id string - The cluster id.
- Instance
Id string - The instance id.
- Additional
Container boolStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - Client
Token string - The client token.
- Container
Storage stringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- Image
Id string - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- Initialize
Script string - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- Keep
Instance boolName - The flag of keep instance name, the value is
true
orfalse
. - Kubernetes
Config NodeKubernetes Config Args - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- Node
Pool stringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- cluster
Id String - The cluster id.
- instance
Id String - The instance id.
- additional
Container BooleanStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client
Token String - The client token.
- container
Storage StringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image
Id String - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize
Script String - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- keep
Instance BooleanName - The flag of keep instance name, the value is
true
orfalse
. - kubernetes
Config NodeKubernetes Config - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node
Pool StringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- cluster
Id string - The cluster id.
- instance
Id string - The instance id.
- additional
Container booleanStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client
Token string - The client token.
- container
Storage stringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image
Id string - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize
Script string - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- keep
Instance booleanName - The flag of keep instance name, the value is
true
orfalse
. - kubernetes
Config NodeKubernetes Config - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node
Pool stringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- cluster_
id str - The cluster id.
- instance_
id str - The instance id.
- additional_
container_ boolstorage_ enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client_
token str - The client token.
- container_
storage_ strpath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image_
id str - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize_
script str - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- keep_
instance_ boolname - The flag of keep instance name, the value is
true
orfalse
. - kubernetes_
config NodeKubernetes Config Args - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node_
pool_ strid - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- cluster
Id String - The cluster id.
- instance
Id String - The instance id.
- additional
Container BooleanStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client
Token String - The client token.
- container
Storage StringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image
Id String - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize
Script String - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- keep
Instance BooleanName - The flag of keep instance name, the value is
true
orfalse
. - kubernetes
Config Property Map - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node
Pool StringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
Outputs
All input properties are implicitly available as output properties. Additionally, the Node resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Node Resource
Get an existing Node 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?: NodeState, opts?: CustomResourceOptions): Node
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_container_storage_enabled: Optional[bool] = None,
client_token: Optional[str] = None,
cluster_id: Optional[str] = None,
container_storage_path: Optional[str] = None,
image_id: Optional[str] = None,
initialize_script: Optional[str] = None,
instance_id: Optional[str] = None,
keep_instance_name: Optional[bool] = None,
kubernetes_config: Optional[NodeKubernetesConfigArgs] = None,
node_pool_id: Optional[str] = None) -> Node
func GetNode(ctx *Context, name string, id IDInput, state *NodeState, opts ...ResourceOption) (*Node, error)
public static Node Get(string name, Input<string> id, NodeState? state, CustomResourceOptions? opts = null)
public static Node get(String name, Output<String> id, NodeState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Additional
Container boolStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - Client
Token string - The client token.
- Cluster
Id string - The cluster id.
- Container
Storage stringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- Image
Id string - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- Initialize
Script string - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- Instance
Id string - The instance id.
- Keep
Instance boolName - The flag of keep instance name, the value is
true
orfalse
. - Kubernetes
Config NodeKubernetes Config - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- Node
Pool stringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- Additional
Container boolStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - Client
Token string - The client token.
- Cluster
Id string - The cluster id.
- Container
Storage stringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- Image
Id string - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- Initialize
Script string - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- Instance
Id string - The instance id.
- Keep
Instance boolName - The flag of keep instance name, the value is
true
orfalse
. - Kubernetes
Config NodeKubernetes Config Args - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- Node
Pool stringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- additional
Container BooleanStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client
Token String - The client token.
- cluster
Id String - The cluster id.
- container
Storage StringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image
Id String - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize
Script String - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- instance
Id String - The instance id.
- keep
Instance BooleanName - The flag of keep instance name, the value is
true
orfalse
. - kubernetes
Config NodeKubernetes Config - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node
Pool StringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- additional
Container booleanStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client
Token string - The client token.
- cluster
Id string - The cluster id.
- container
Storage stringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image
Id string - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize
Script string - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- instance
Id string - The instance id.
- keep
Instance booleanName - The flag of keep instance name, the value is
true
orfalse
. - kubernetes
Config NodeKubernetes Config - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node
Pool stringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- additional_
container_ boolstorage_ enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client_
token str - The client token.
- cluster_
id str - The cluster id.
- container_
storage_ strpath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image_
id str - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize_
script str - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- instance_
id str - The instance id.
- keep_
instance_ boolname - The flag of keep instance name, the value is
true
orfalse
. - kubernetes_
config NodeKubernetes Config Args - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node_
pool_ strid - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
- additional
Container BooleanStorage Enabled - The flag of additional container storage enable, the value is
true
orfalse
. This field is valid only when adding an existing instance to the default node pool. - client
Token String - The client token.
- cluster
Id String - The cluster id.
- container
Storage StringPath - The container storage path. This field is valid only when adding an existing instance to the default node pool.
- image
Id String - The ImageId of NodeConfig. This field is valid only when adding an existing instance to the default node pool.
- initialize
Script String - The initializeScript of Node. This field is valid only when adding an existing instance to the default node pool.
- instance
Id String - The instance id.
- keep
Instance BooleanName - The flag of keep instance name, the value is
true
orfalse
. - kubernetes
Config Property Map - The KubernetesConfig of Node. This field is valid only when adding an existing instance to the default node pool.
- node
Pool StringId - The node pool id. This field is used to specify the custom node pool to which you want to add nodes. If not filled in, it means added to the default node pool.
Supporting Types
NodeKubernetesConfig, NodeKubernetesConfigArgs
- Cordon bool
- The Cordon of KubernetesConfig.
- Labels
List<Node
Kubernetes Config Label> - The Labels of KubernetesConfig.
- Taints
List<Node
Kubernetes Config Taint> - The Taints of KubernetesConfig.
- Cordon bool
- The Cordon of KubernetesConfig.
- Labels
[]Node
Kubernetes Config Label - The Labels of KubernetesConfig.
- Taints
[]Node
Kubernetes Config Taint - The Taints of KubernetesConfig.
- cordon Boolean
- The Cordon of KubernetesConfig.
- labels
List<Node
Kubernetes Config Label> - The Labels of KubernetesConfig.
- taints
List<Node
Kubernetes Config Taint> - The Taints of KubernetesConfig.
- cordon boolean
- The Cordon of KubernetesConfig.
- labels
Node
Kubernetes Config Label[] - The Labels of KubernetesConfig.
- taints
Node
Kubernetes Config Taint[] - The Taints of KubernetesConfig.
- cordon bool
- The Cordon of KubernetesConfig.
- labels
Sequence[Node
Kubernetes Config Label] - The Labels of KubernetesConfig.
- taints
Sequence[Node
Kubernetes Config Taint] - The Taints of KubernetesConfig.
- cordon Boolean
- The Cordon of KubernetesConfig.
- labels List<Property Map>
- The Labels of KubernetesConfig.
- taints List<Property Map>
- The Taints of KubernetesConfig.
NodeKubernetesConfigLabel, NodeKubernetesConfigLabelArgs
NodeKubernetesConfigTaint, NodeKubernetesConfigTaintArgs
Import
VKE node can be imported using the node id, e.g.
$ pulumi import volcengine:vke/node:Node default nc5t5epmrsf****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.