community.aws.eks_nodegroup module – Manage EKS Nodegroup module
Note
This module is part of the community.aws collection (version 5.5.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.aws
.
To use it in a playbook, specify: community.aws.eks_nodegroup
.
New in community.aws 5.3.0
Synopsis
Manage EKS Nodegroup.
Parameters
Parameter |
Comments |
---|---|
AWS access key ID. See the AWS documentation for more information about access tokens https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys. The The aws_access_key and profile options are mutually exclusive. The aws_access_key_id alias was added in release 5.1.0 for consistency with the AWS botocore SDK. The ec2_access_key alias has been deprecated and will be removed in a release after 2024-12-01. Support for the |
|
The AMI type for your node group. Choices:
|
|
The location of a CA Bundle to use when validating SSL certificates. The |
|
A dictionary to modify the botocore configuration. Parameters can be found in the AWS documentation https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config. |
|
The capacity type for your node group. Choices:
|
|
Name of EKS Cluster. |
|
Use a The Choices:
|
|
Size of disk in nodegroup nodes. If you specify launch_template, then don’t specify disk_size, or the node group deployment will fail. |
|
URL to connect to instead of the default AWS endpoints. While this can be used to connection to other AWS-compatible services the amazon.aws and community.aws collections are only tested against AWS. The The ec2_url and s3_url aliases have been deprecated and will be removed in a release after 2024-12-01. Support for the |
|
Specify the instance types for a node group. If you specify launch_template, then don’t specify instance_types, or the node group deployment will fail. |
|
The Kubernetes labels to be applied to the nodes in the node group when they are created. Default: |
|
An object representing a node group’s launch template specification. If specified, then do not specify instanceTypes, diskSize, or remoteAccess. |
|
The ID of the launch template. |
|
The name of the launch template. |
|
The version of the launch template to use. If no version is specified, then the template’s default version is used. |
|
Name of EKS Nodegroup. |
|
ARN of IAM role used by the EKS cluster Nodegroup. |
|
A named AWS profile to use for authentication. See the AWS documentation for more information about named profiles https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html. The The profile option is mutually exclusive with the aws_access_key, aws_secret_key and security_token options. |
|
Purge existing tags that are not found in the nodegroup. Choices:
|
|
The AWS region to use. For global services such as IAM, Route53 and CloudFront, region is ignored. The See the Amazon AWS documentation for more information http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region. The Support for the |
|
The AMI version of the Amazon EKS optimized AMI to use with your node group. |
|
The remote access (SSH) configuration to use with your node group. If you specify launch_template, then don’t specify remote_access, or the node group deployment will fail. |
|
The Amazon EC2 SSH key that provides access for SSH communication with the nodes in the managed node group. |
|
The security groups that are allowed SSH access (port 22) to the nodes. |
|
The scaling configuration details for the Auto Scaling group that is created for your node group. Default: |
|
The current number of nodes that the managed node group should maintain. |
|
The maximum number of nodes that the managed node group can scale out to. |
|
The minimum number of nodes that the managed node group can scale in to. |
|
AWS secret access key. See the AWS documentation for more information about access tokens https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys. The The secret_key and profile options are mutually exclusive. The aws_secret_access_key alias was added in release 5.1.0 for consistency with the AWS botocore SDK. The ec2_secret_key alias has been deprecated and will be removed in a release after 2024-12-01. Support for the |
|
AWS STS session token for use with temporary credentials. See the AWS documentation for more information about access tokens https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys. The The security_token and profile options are mutually exclusive. Aliases aws_session_token and session_token were added in release 3.2.0, with the parameter being renamed from security_token to session_token in release 6.0.0. The security_token, aws_security_token, and access_token aliases have been deprecated and will be removed in a release after 2024-12-01. Support for the |
|
Create or delete the Nodegroup. Choices:
|
|
list of subnet IDs for the Kubernetes cluster. |
|
A dictionary of resource tags. |
|
The Kubernetes taints to be applied to the nodes in the node group. Default: |
|
The effect of the taint. Choices:
|
|
The key of the taint. |
|
The value of the taint. |
|
The node group update configuration. Default: |
|
The maximum number of nodes unavailable at once during a version update. |
|
The maximum percentage of nodes unavailable during a version update. |
|
When set to Setting validate_certs=false is strongly discouraged, as an alternative, consider setting aws_ca_bundle instead. Choices:
|
|
Specifies whether the module waits until the profile is created or deleted before moving on. Choices:
|
|
The duration in seconds to wait for the nodegroup to become active. Defaults to Default: |
Notes
Note
Caution: For modules, environment variables and configuration files are read from the Ansible ‘host’ context and not the ‘controller’ context. As such, files may need to be explicitly copied to the ‘host’. For lookup and connection plugins, environment variables and configuration files are read from the Ansible ‘controller’ context and not the ‘host’ context.
The AWS SDK (boto3) that Ansible uses may also read defaults for credentials and other settings, such as the region, from its configuration files in the Ansible ‘host’ context (typically
~/.aws/credentials
). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information.
Examples
# Note: These examples do not set authentication details, see the AWS Guide for details.
- name: create nodegroup
community.aws.eks_nodegroup:
name: test_nodegroup
state: present
cluster_name: test_cluster
node_role: arn:aws:eks:us-east-1:1231231123:role/asdf
subnets:
- subnet-qwerty123
- subnet-asdfg456
scaling_config:
- min_size: 1
- max_size: 2
- desired_size: 1
disk_size: 20
instance_types: 't3.micro'
ami_type: 'AL2_x86_64'
labels:
- 'teste': 'test'
taints:
- key: 'test'
value: 'test'
effect: 'NO_SCHEDULE'
capacity_type: 'on_demand'
- name: Remove an EKS Nodegrop
community.aws.eks_nodegroup:
name: test_nodegroup
cluster_name: test_cluster
wait: yes
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
This is the AMI type that was specified in the node group configuration. Returned: when state is present Sample: |
|
The capacity type of your managed node group. Returned: when state is present Sample: |
|
Name of EKS Cluster Returned: when state is present Sample: |
|
Nodegroup creation date and time. Returned: when state is present Sample: |
|
This is the disk size in the node group configuration. Returned: when state is present Sample: |
|
The health status of the node group. Returned: when state is present Sample: |
|
This is the instance type that is associated with the node group. Returned: when state is present Sample: |
|
The Kubernetes labels applied to the nodes in the node group. Returned: when state is present Sample: |
|
If a launch template was used to create the node group, then this is the launch template that was used. Returned: when state is present Sample: |
|
Nodegroup modified date and time. Returned: when state is present Sample: |
|
ARN of the IAM Role used by Nodegroup. Returned: when state is present Sample: |
|
The Amazon Resource Name (ARN) associated with the managed node group. Returned: when state is present Sample: |
|
The name associated with an Amazon EKS managed node group. Returned: when state is present Sample: |
|
This is the version of the Amazon EKS optimized AMI that the node group was deployed with. Returned: when state is present Sample: |
|
This is the remote access configuration that is associated with the node group. Returned: when state is present Sample: |
|
The resources associated with the node group. Returned: when state is present |
|
The Auto Scaling groups associated with the node group. Returned: when state is present |
|
The remote access security group associated with the node group. Returned: when state is present |
|
The scaling configuration details for the Auto Scaling group that is associated with your node group. Returned: when state is present Sample: |
|
status of the EKS Nodegroup. Returned: when state is present Sample: |
|
List of subnets used in Fargate Profile. Returned: when state is present Sample: |
|
Nodegroup tags. Returned: when state is present Sample: |
|
The Kubernetes taints to be applied to the nodes in the node group when they are created. Returned: when state is present Sample: |
|
The node group update configuration. Returned: when state is present |
|
The maximum number of nodes unavailable at once during a version update. Returned: success |
|
The maximum percentage of nodes unavailable during a version update. Returned: success |
|
The Kubernetes version of the managed node group. Returned: when state is present Sample: |