Class Nodegroup
The Nodegroup resource class.
Inherited Members
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.AWS.EKS.dll
Syntax (csharp)
public class Nodegroup : Resource, INodegroup, IResource, IConstruct, IDependable
Syntax (vb)
Public Class Nodegroup
Inherits Resource
Implements INodegroup, IResource, IConstruct, IDependable
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.EKS;
using Amazon.CDK.AWS.IAM;
Cluster cluster;
InstanceType instanceType;
Role role;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
var nodegroup = new Nodegroup(this, "MyNodegroup", new NodegroupProps {
Cluster = cluster,
// the properties below are optional
AmiType = NodegroupAmiType.AL2_X86_64,
CapacityType = CapacityType.SPOT,
DesiredSize = 123,
DiskSize = 123,
ForceUpdate = false,
InstanceType = instanceType,
InstanceTypes = new [] { instanceType },
Labels = new Dictionary<string, string> {
{ "labelsKey", "labels" }
},
LaunchTemplateSpec = new LaunchTemplateSpec {
Id = "id",
// the properties below are optional
Version = "version"
},
MaxSize = 123,
MinSize = 123,
NodegroupName = "nodegroupName",
NodeRole = role,
ReleaseVersion = "releaseVersion",
RemoteAccess = new NodegroupRemoteAccess {
SshKeyName = "sshKeyName",
// the properties below are optional
SourceSecurityGroups = new [] { securityGroup }
},
Subnets = new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
SubnetName = "subnetName",
Subnets = new [] { subnet },
SubnetType = SubnetType.ISOLATED
},
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
Taints = new [] { new TaintSpec {
Effect = TaintEffect.NO_SCHEDULE,
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
Nodegroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Nodegroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Nodegroup(Construct, String, INodegroupProps) |
Properties
Cluster | the Amazon EKS cluster resource. |
NodegroupArn | ARN of the nodegroup. |
NodegroupName | Nodegroup name. |
Role | IAM role of the instance profile for the nodegroup. |
Methods
FromNodegroupName(Construct, String, String) | Import the Nodegroup from attributes. |
Constructors
Nodegroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Nodegroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Nodegroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Nodegroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Nodegroup(Construct, String, INodegroupProps)
public Nodegroup(Construct scope, string id, INodegroupProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props INodegroupProps
Properties
Cluster
the Amazon EKS cluster resource.
public virtual ICluster Cluster { get; }
Property Value
Remarks
Attribute: ClusterName
NodegroupArn
ARN of the nodegroup.
public virtual string NodegroupArn { get; }
Property Value
System.String
Remarks
Attribute: true
NodegroupName
Nodegroup name.
public virtual string NodegroupName { get; }
Property Value
System.String
Remarks
Attribute: true
Role
IAM role of the instance profile for the nodegroup.
public virtual IRole Role { get; }
Property Value
Methods
FromNodegroupName(Construct, String, String)
Import the Nodegroup from attributes.
public static INodegroup FromNodegroupName(Construct scope, string id, string nodegroupName)
Parameters
- scope Constructs.Construct
- id System.String
- nodegroupName System.String
Returns