Class: AWSCDK::EKS::CfnNodegroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKS::CfnNodegroupProps
- Defined in:
- eks/cfn_nodegroup_props.rb
Overview
Properties for defining a CfnNodegroup.
Instance Attribute Summary collapse
-
#ami_type ⇒ String?
readonly
The AMI type for your node group.
-
#capacity_type ⇒ String?
readonly
The capacity type of your managed node group.
-
#cluster_name ⇒ String, AWSCDK::Interfaces::AWSEKS::IClusterRef
readonly
The name of your cluster.
-
#disk_size ⇒ Numeric?
readonly
The root device disk size (in GiB) for your node group instances.
-
#force_update_enabled ⇒ Boolean, ...
readonly
Force the update if any
Podon the existing node group can't be drained due to aPoddisruption budget issue. -
#instance_types ⇒ Array<String>?
readonly
Specify the instance types for a node group.
-
#labels ⇒ AWSCDK::IResolvable, ...
readonly
The Kubernetes
labelsapplied to the nodes in the node group. -
#launch_template ⇒ AWSCDK::IResolvable, ...
readonly
An object representing a node group's launch template specification.
-
#node_repair_config ⇒ AWSCDK::IResolvable, ...
readonly
The node auto repair configuration for the node group.
-
#node_role ⇒ String, AWSCDK::Interfaces::AWSIAM::IRoleRef
readonly
The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
-
#nodegroup_name ⇒ String?
readonly
The unique name to give your node group.
-
#release_version ⇒ String?
readonly
The AMI version of the Amazon EKS optimized AMI to use with your node group (for example,
1.14.7- *YYYYMMDD*). -
#remote_access ⇒ AWSCDK::IResolvable, ...
readonly
The remote access configuration to use with your node group.
-
#scaling_config ⇒ AWSCDK::IResolvable, ...
readonly
The scaling configuration details for the Auto Scaling group that is created for your node group.
-
#subnets ⇒ Array<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef>
readonly
The subnets to use for the Auto Scaling group that is created for your node group.
-
#tags ⇒ Hash{String => String}?
readonly
Metadata that assists with categorization and organization.
-
#taints ⇒ AWSCDK::IResolvable, ...
readonly
The Kubernetes taints to be applied to the nodes in the node group when they are created.
-
#update_config ⇒ AWSCDK::IResolvable, ...
readonly
The node group update configuration.
-
#version ⇒ String?
readonly
The Kubernetes version to use for your managed nodes.
-
#warm_pool_config ⇒ AWSCDK::IResolvable, ...
readonly
The warm pool configuration for the node group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cluster_name:, node_role:, subnets:, ami_type: nil, capacity_type: nil, disk_size: nil, force_update_enabled: nil, instance_types: nil, labels: nil, launch_template: nil, nodegroup_name: nil, node_repair_config: nil, release_version: nil, remote_access: nil, scaling_config: nil, tags: nil, taints: nil, update_config: nil, version: nil, warm_pool_config: nil) ⇒ CfnNodegroupProps
constructor
A new instance of CfnNodegroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cluster_name:, node_role:, subnets:, ami_type: nil, capacity_type: nil, disk_size: nil, force_update_enabled: nil, instance_types: nil, labels: nil, launch_template: nil, nodegroup_name: nil, node_repair_config: nil, release_version: nil, remote_access: nil, scaling_config: nil, tags: nil, taints: nil, update_config: nil, version: nil, warm_pool_config: nil) ⇒ CfnNodegroupProps
Returns a new instance of CfnNodegroupProps.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'eks/cfn_nodegroup_props.rb', line 29 def initialize(cluster_name:, node_role:, subnets:, ami_type: nil, capacity_type: nil, disk_size: nil, force_update_enabled: nil, instance_types: nil, labels: nil, launch_template: nil, nodegroup_name: nil, node_repair_config: nil, release_version: nil, remote_access: nil, scaling_config: nil, tags: nil, taints: nil, update_config: nil, version: nil, warm_pool_config: nil) @cluster_name = cluster_name Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19la3MuSUNsdXN0ZXJSZWYifV19fQ==")), "clusterName") @node_role = node_role Jsii::Type.check_type(@node_role, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "nodeRole") @subnets = subnets Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU3VibmV0UmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "subnets") @ami_type = ami_type Jsii::Type.check_type(@ami_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "amiType") unless @ami_type.nil? @capacity_type = capacity_type Jsii::Type.check_type(@capacity_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityType") unless @capacity_type.nil? @disk_size = disk_size Jsii::Type.check_type(@disk_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "diskSize") unless @disk_size.nil? @force_update_enabled = force_update_enabled Jsii::Type.check_type(@force_update_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "forceUpdateEnabled") unless @force_update_enabled.nil? @instance_types = instance_types Jsii::Type.check_type(@instance_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "instanceTypes") unless @instance_types.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "labels") unless @labels.nil? @launch_template = launch_template.is_a?(Hash) ? ::AWSCDK::EKS::CfnNodegroup::LaunchTemplateSpecificationProperty.new(**launch_template.transform_keys(&:to_sym)) : launch_template Jsii::Type.check_type(@launch_template, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuTm9kZWdyb3VwLkxhdW5jaFRlbXBsYXRlU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "launchTemplate") unless @launch_template.nil? @nodegroup_name = nodegroup_name Jsii::Type.check_type(@nodegroup_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nodegroupName") unless @nodegroup_name.nil? @node_repair_config = node_repair_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnNodegroup::NodeRepairConfigProperty.new(**node_repair_config.transform_keys(&:to_sym)) : node_repair_config Jsii::Type.check_type(@node_repair_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuTm9kZWdyb3VwLk5vZGVSZXBhaXJDb25maWdQcm9wZXJ0eSJ9XX19")), "nodeRepairConfig") unless @node_repair_config.nil? @release_version = release_version Jsii::Type.check_type(@release_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "releaseVersion") unless @release_version.nil? @remote_access = remote_access.is_a?(Hash) ? ::AWSCDK::EKS::CfnNodegroup::RemoteAccessProperty.new(**remote_access.transform_keys(&:to_sym)) : remote_access Jsii::Type.check_type(@remote_access, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuTm9kZWdyb3VwLlJlbW90ZUFjY2Vzc1Byb3BlcnR5In1dfX0=")), "remoteAccess") unless @remote_access.nil? @scaling_config = scaling_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnNodegroup::ScalingConfigProperty.new(**scaling_config.transform_keys(&:to_sym)) : scaling_config Jsii::Type.check_type(@scaling_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuTm9kZWdyb3VwLlNjYWxpbmdDb25maWdQcm9wZXJ0eSJ9XX19")), "scalingConfig") unless @scaling_config.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? @taints = taints Jsii::Type.check_type(@taints, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkNmbk5vZGVncm91cC5UYWludFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "taints") unless @taints.nil? @update_config = update_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnNodegroup::UpdateConfigProperty.new(**update_config.transform_keys(&:to_sym)) : update_config Jsii::Type.check_type(@update_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuTm9kZWdyb3VwLlVwZGF0ZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "updateConfig") unless @update_config.nil? @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil? @warm_pool_config = warm_pool_config.is_a?(Hash) ? ::AWSCDK::EKS::CfnNodegroup::WarmPoolConfigProperty.new(**warm_pool_config.transform_keys(&:to_sym)) : warm_pool_config Jsii::Type.check_type(@warm_pool_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuTm9kZWdyb3VwLldhcm1Qb29sQ29uZmlnUHJvcGVydHkifV19fQ==")), "warmPoolConfig") unless @warm_pool_config.nil? end |
Instance Attribute Details
#ami_type ⇒ String? (readonly)
The AMI type for your node group.
If you specify launch_template , and your launch template uses a custom AMI, then don't specify ami_type , or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows to your Windows nodes rolearn in the aws-auth ConfigMap . For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide .
97 98 99 |
# File 'eks/cfn_nodegroup_props.rb', line 97 def ami_type @ami_type end |
#capacity_type ⇒ String? (readonly)
The capacity type of your managed node group.
102 103 104 |
# File 'eks/cfn_nodegroup_props.rb', line 102 def capacity_type @capacity_type end |
#cluster_name ⇒ String, AWSCDK::Interfaces::AWSEKS::IClusterRef (readonly)
The name of your cluster.
76 77 78 |
# File 'eks/cfn_nodegroup_props.rb', line 76 def cluster_name @cluster_name end |
#disk_size ⇒ Numeric? (readonly)
The root device disk size (in GiB) for your node group instances.
The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify launch_template , then don't specify disk_size , or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide .
109 110 111 |
# File 'eks/cfn_nodegroup_props.rb', line 109 def disk_size @disk_size end |
#force_update_enabled ⇒ Boolean, ... (readonly)
Default: - false
Force the update if any Pod on the existing node group can't be drained due to a Pod disruption budget issue.
If an update fails because all Pods can't be drained, you can force the update after it fails to terminate the old node whether or not any Pod is running on the node.
117 118 119 |
# File 'eks/cfn_nodegroup_props.rb', line 117 def force_update_enabled @force_update_enabled end |
#instance_types ⇒ Array<String>? (readonly)
Specify the instance types for a node group.
If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the ami_type parameter. If you specify launch_template , then you can specify zero or one instance type in your launch template or you can specify 0-20 instance types for instance_types . If however, you specify an instance type in your launch template and specify any instance_types , the node group deployment will fail. If you don't specify an instance type in a launch template or for instance_types , then t3.medium is used, by default. If you specify Spot for capacity_type , then we recommend specifying multiple values for instance_types . For more information, see Managed node group capacity types and Customizing managed nodes with launch templates in the Amazon EKS User Guide .
124 125 126 |
# File 'eks/cfn_nodegroup_props.rb', line 124 def instance_types @instance_types end |
#labels ⇒ AWSCDK::IResolvable, ... (readonly)
The Kubernetes labels applied to the nodes in the node group.
Only
labelsthat are applied with the Amazon EKS API are shown here. There may be other Kuberneteslabelsapplied to the nodes in this group.
131 132 133 |
# File 'eks/cfn_nodegroup_props.rb', line 131 def labels @labels end |
#launch_template ⇒ AWSCDK::IResolvable, ... (readonly)
An object representing a node group's launch template specification.
When using this object, don't directly specify instance_types , disk_size , or remote_access . You cannot later specify a different launch template ID or name than what was used to create the node group.
Make sure that the launch template meets the requirements in launch_template_specification . Also refer to Customizing managed nodes with launch templates in the Amazon EKS User Guide .
140 141 142 |
# File 'eks/cfn_nodegroup_props.rb', line 140 def launch_template @launch_template end |
#node_repair_config ⇒ AWSCDK::IResolvable, ... (readonly)
The node auto repair configuration for the node group.
150 151 152 |
# File 'eks/cfn_nodegroup_props.rb', line 150 def node_repair_config @node_repair_config end |
#node_role ⇒ String, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)
The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
The Amazon EKS worker node kubelet daemon makes calls to AWS APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide . If you specify launch_template , then don't specify [IamInstanceProfile](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html) in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide .
83 84 85 |
# File 'eks/cfn_nodegroup_props.rb', line 83 def node_role @node_role end |
#nodegroup_name ⇒ String? (readonly)
The unique name to give your node group.
145 146 147 |
# File 'eks/cfn_nodegroup_props.rb', line 145 def nodegroup_name @nodegroup_name end |
#release_version ⇒ String? (readonly)
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 .
Changing this value triggers an update of the node group if one is available. You can't update other properties at the same time as updating
Release Version.
157 158 159 |
# File 'eks/cfn_nodegroup_props.rb', line 157 def release_version @release_version end |
#remote_access ⇒ AWSCDK::IResolvable, ... (readonly)
The remote access configuration to use with your node group.
For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify launch_template , then don't specify remote_access , or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide .
164 165 166 |
# File 'eks/cfn_nodegroup_props.rb', line 164 def remote_access @remote_access end |
#scaling_config ⇒ AWSCDK::IResolvable, ... (readonly)
The scaling configuration details for the Auto Scaling group that is created for your node group.
169 170 171 |
# File 'eks/cfn_nodegroup_props.rb', line 169 def scaling_config @scaling_config end |
#subnets ⇒ Array<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef> (readonly)
The subnets to use for the Auto Scaling group that is created for your node group.
If you specify launch_template , then don't specify [SubnetId](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html) in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide .
90 91 92 |
# File 'eks/cfn_nodegroup_props.rb', line 90 def subnets @subnets end |
#tags ⇒ Hash{String => String}? (readonly)
Metadata that assists with categorization and organization.
Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or AWS resources.
176 177 178 |
# File 'eks/cfn_nodegroup_props.rb', line 176 def @tags end |
#taints ⇒ AWSCDK::IResolvable, ... (readonly)
The Kubernetes taints to be applied to the nodes in the node group when they are created.
Effect is one of No_Schedule , Prefer_No_Schedule , or No_Execute . Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see Node taints on managed node groups .
183 184 185 |
# File 'eks/cfn_nodegroup_props.rb', line 183 def taints @taints end |
#update_config ⇒ AWSCDK::IResolvable, ... (readonly)
The node group update configuration.
188 189 190 |
# File 'eks/cfn_nodegroup_props.rb', line 188 def update_config @update_config end |
#version ⇒ String? (readonly)
The Kubernetes version to use for your managed nodes.
By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify launch_template , and your launch template uses a custom AMI, then don't specify version , or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide .
You can't update other properties at the same time as updating
Version.
197 198 199 |
# File 'eks/cfn_nodegroup_props.rb', line 197 def version @version end |
#warm_pool_config ⇒ AWSCDK::IResolvable, ... (readonly)
The warm pool configuration for the node group.
202 203 204 |
# File 'eks/cfn_nodegroup_props.rb', line 202 def warm_pool_config @warm_pool_config end |
Class Method Details
.jsii_properties ⇒ Object
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'eks/cfn_nodegroup_props.rb', line 204 def self.jsii_properties { :cluster_name => "clusterName", :node_role => "nodeRole", :subnets => "subnets", :ami_type => "amiType", :capacity_type => "capacityType", :disk_size => "diskSize", :force_update_enabled => "forceUpdateEnabled", :instance_types => "instanceTypes", :labels => "labels", :launch_template => "launchTemplate", :nodegroup_name => "nodegroupName", :node_repair_config => "nodeRepairConfig", :release_version => "releaseVersion", :remote_access => "remoteAccess", :scaling_config => "scalingConfig", :tags => "tags", :taints => "taints", :update_config => "updateConfig", :version => "version", :warm_pool_config => "warmPoolConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'eks/cfn_nodegroup_props.rb', line 229 def to_jsii result = {} result.merge!({ "clusterName" => @cluster_name, "nodeRole" => @node_role, "subnets" => @subnets, "amiType" => @ami_type, "capacityType" => @capacity_type, "diskSize" => @disk_size, "forceUpdateEnabled" => @force_update_enabled, "instanceTypes" => @instance_types, "labels" => @labels, "launchTemplate" => @launch_template, "nodegroupName" => @nodegroup_name, "nodeRepairConfig" => @node_repair_config, "releaseVersion" => @release_version, "remoteAccess" => @remote_access, "scalingConfig" => @scaling_config, "tags" => @tags, "taints" => @taints, "updateConfig" => @update_config, "version" => @version, "warmPoolConfig" => @warm_pool_config, }) result.compact end |