Class CfnNodegroup
Creates a managed node group for an Amazon EKS cluster.
Inherited Members
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnNodegroup : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnNodegroup
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
You can only create a node group for your cluster that is equal to the current Kubernetes version for the cluster. All node groups are created with the latest AMI release version for the respective minor Kubernetes version of the cluster, unless you deploy a custom AMI using a launch template. For more information about using launch templates, see Customizing managed nodes with launch templates .
An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by AWS for an Amazon EKS cluster. For more information, see Managed node groups in the Amazon EKS User Guide .
Windows AMI types are only supported for commercial AWS Regions that support Windows on Amazon EKS.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html
CloudformationResource: AWS::EKS::Nodegroup
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.EKS;
var cfnNodegroup = new CfnNodegroup(this, "MyCfnNodegroup", new CfnNodegroupProps {
ClusterName = "clusterName",
NodeRole = "nodeRole",
Subnets = new [] { "subnets" },
// the properties below are optional
AmiType = "amiType",
CapacityType = "capacityType",
DiskSize = 123,
ForceUpdateEnabled = false,
InstanceTypes = new [] { "instanceTypes" },
Labels = new Dictionary<string, string> {
{ "labelsKey", "labels" }
},
LaunchTemplate = new LaunchTemplateSpecificationProperty {
Id = "id",
Name = "name",
Version = "version"
},
NodegroupName = "nodegroupName",
ReleaseVersion = "releaseVersion",
RemoteAccess = new RemoteAccessProperty {
Ec2SshKey = "ec2SshKey",
// the properties below are optional
SourceSecurityGroups = new [] { "sourceSecurityGroups" }
},
ScalingConfig = new ScalingConfigProperty {
DesiredSize = 123,
MaxSize = 123,
MinSize = 123
},
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
Taints = new [] { new TaintProperty {
Effect = "effect",
Key = "key",
Value = "value"
} },
UpdateConfig = new UpdateConfigProperty {
MaxUnavailable = 123,
MaxUnavailablePercentage = 123
},
Version = "version"
});
Synopsis
Constructors
CfnNodegroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnNodegroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnNodegroup(Construct, String, ICfnNodegroupProps) |
Properties
AmiType | The AMI type for your node group. |
AttrArn | The Amazon Resource Name (ARN) associated with the managed node group. |
AttrClusterName | The name of your cluster. |
AttrId | |
AttrNodegroupName | The name associated with an Amazon EKS managed node group. |
CapacityType | The capacity type of your managed node group. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ClusterName | The name of your cluster. |
DiskSize | The root device disk size (in GiB) for your node group instances. |
ForceUpdateEnabled | Force the update if any |
InstanceTypes | Specify the instance types for a node group. |
Labels | The Kubernetes |
LaunchTemplate | An object representing a node group's launch template specification. |
NodegroupName | The unique name to give your node group. |
NodeRole | The Amazon Resource Name (ARN) of the IAM role to associate with your node group. |
ReleaseVersion | The AMI version of the Amazon EKS optimized AMI to use with your node group (for example, |
RemoteAccess | The remote access configuration to use with your node group. |
ScalingConfig | The scaling configuration details for the Auto Scaling group that is created for your node group. |
Subnets | The subnets to use for the Auto Scaling group that is created for your node group. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | Metadata that assists with categorization and organization. |
Taints | The Kubernetes taints to be applied to the nodes in the node group when they are created. |
UpdateConfig | The node group update configuration. |
Version | The Kubernetes version to use for your managed nodes. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnNodegroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnNodegroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnNodegroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnNodegroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnNodegroup(Construct, String, ICfnNodegroupProps)
public CfnNodegroup(Construct scope, string id, ICfnNodegroupProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnNodegroupProps
Resource properties.
Properties
AmiType
The AMI type for your node group.
public virtual string AmiType { get; set; }
Property Value
System.String
AttrArn
The Amazon Resource Name (ARN) associated with the managed node group.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrClusterName
The name of your cluster.
public virtual string AttrClusterName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ClusterName
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrNodegroupName
The name associated with an Amazon EKS managed node group.
public virtual string AttrNodegroupName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: NodegroupName
CapacityType
The capacity type of your managed node group.
public virtual string CapacityType { get; set; }
Property Value
System.String
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ClusterName
The name of your cluster.
public virtual string ClusterName { get; set; }
Property Value
System.String
DiskSize
The root device disk size (in GiB) for your node group instances.
public virtual Nullable<double> DiskSize { get; set; }
Property Value
System.Nullable<System.Double>
ForceUpdateEnabled
Force the update if any Pod
on the existing node group can't be drained due to a Pod
disruption budget issue.
public virtual object ForceUpdateEnabled { get; set; }
Property Value
System.Object
InstanceTypes
Specify the instance types for a node group.
public virtual string[] InstanceTypes { get; set; }
Property Value
System.String[]
Labels
The Kubernetes labels
applied to the nodes in the node group.
public virtual object Labels { get; set; }
Property Value
System.Object
LaunchTemplate
An object representing a node group's launch template specification.
public virtual object LaunchTemplate { get; set; }
Property Value
System.Object
NodegroupName
The unique name to give your node group.
public virtual string NodegroupName { get; set; }
Property Value
System.String
NodeRole
The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
public virtual string NodeRole { get; set; }
Property Value
System.String
ReleaseVersion
The AMI version of the Amazon EKS optimized AMI to use with your node group (for example, 1.14.7- *YYYYMMDD*
). By default, the latest available AMI version for the node group's current Kubernetes version is used. For more information, see Amazon EKS optimized Linux AMI Versions in the Amazon EKS User Guide .
public virtual string ReleaseVersion { get; set; }
Property Value
System.String
RemoteAccess
The remote access configuration to use with your node group.
public virtual object RemoteAccess { get; set; }
Property Value
System.Object
ScalingConfig
The scaling configuration details for the Auto Scaling group that is created for your node group.
public virtual object ScalingConfig { get; set; }
Property Value
System.Object
Subnets
The subnets to use for the Auto Scaling group that is created for your node group.
public virtual string[] Subnets { get; set; }
Property Value
System.String[]
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Metadata that assists with categorization and organization.
public virtual IDictionary<string, string> TagsRaw { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Taints
The Kubernetes taints to be applied to the nodes in the node group when they are created.
public virtual object Taints { get; set; }
Property Value
System.Object
UpdateConfig
The node group update configuration.
public virtual object UpdateConfig { get; set; }
Property Value
System.Object
Version
The Kubernetes version to use for your managed nodes.
public virtual string Version { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>