community / community.aws / 5.4.0 / module / eks_nodegroup Manage EKS Nodegroup module | "added in version" 5.3.0 of community.aws" Authors: Tiago Jarra (@tjarra)community.aws.eks_nodegroup (5.4.0) — module
Install with ansible-galaxy collection install community.aws:==5.4.0
collections: - name: community.aws version: 5.4.0
Manage EKS Nodegroup.
# 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
name: description: Name of EKS Nodegroup. required: true type: str tags: aliases: - resource_tags description: A dictionary of resource tags. type: dict wait: default: false description: Specifies whether the module waits until the profile is created or deleted before moving on. type: bool state: choices: - absent - present default: present description: Create or delete the Nodegroup. type: str labels: default: {} description: The Kubernetes labels to be applied to the nodes in the node group when they are created. type: dict region: aliases: - aws_region - ec2_region description: - The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See U(http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region) type: str taints: default: [] description: The Kubernetes taints to be applied to the nodes in the node group. elements: dict suboptions: effect: choices: - NO_SCHEDULE - NO_EXECUTE - PREFER_NO_SCHEDULE description: The effect of the taint. type: str key: description: The key of the taint. type: str value: description: The value of the taint. type: str type: list ec2_url: aliases: - aws_endpoint_url - endpoint_url description: - URL to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used. type: str profile: aliases: - aws_profile description: - The I(profile) option is mutually exclusive with the I(aws_access_key), I(aws_secret_key) and I(security_token) options. type: str subnets: description: list of subnet IDs for the Kubernetes cluster. elements: str type: list ami_type: choices: - AL2_x86_64 - AL2_x86_64_GPU - AL2_ARM_64 - CUSTOM - BOTTLEROCKET_ARM_64 - BOTTLEROCKET_x86_64 description: The AMI type for your node group. type: str disk_size: description: - Size of disk in nodegroup nodes. If you specify I(launch_template), then don't specify I(disk_size), or the node group deployment will fail. type: int node_role: description: ARN of IAM role used by the EKS cluster Nodegroup. type: str aws_config: description: - A dictionary to modify the botocore configuration. - Parameters can be found at U(https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config). type: dict purge_tags: default: true description: - Purge existing tags that are not found in the nodegroup. type: bool cluster_name: description: Name of EKS Cluster. required: true type: str wait_timeout: default: 1200 description: The duration in seconds to wait for the nodegroup to become active. Defaults to C(1200) seconds. type: int aws_ca_bundle: description: - The location of a CA Bundle to use when validating SSL certificates. - 'Note: The CA Bundle is read ''module'' side and may need to be explicitly copied from the controller if not run locally.' type: path capacity_type: choices: - ON_DEMAND - SPOT default: ON_DEMAND description: The capacity type for your node group. type: str remote_access: description: - The remote access (SSH) configuration to use with your node group. If you specify I(launch_template), then don't specify I(remote_access), or the node group deployment will fail. suboptions: ec2_ssh_key: description: The Amazon EC2 SSH key that provides access for SSH communication with the nodes in the managed node group. type: str source_sg: description: The security groups that are allowed SSH access (port 22) to the nodes. elements: str type: list type: dict update_config: default: max_unavailable: 1 description: The node group update configuration. suboptions: max_unavailable: description: The maximum number of nodes unavailable at once during a version update. type: int max_unavailable_percentage: description: The maximum percentage of nodes unavailable during a version update. type: int type: dict aws_access_key: aliases: - ec2_access_key - access_key description: - C(AWS access key). If not set then the value of the C(AWS_ACCESS_KEY_ID), C(AWS_ACCESS_KEY) or C(EC2_ACCESS_KEY) environment variable is used. - The I(aws_access_key) and I(profile) options are mutually exclusive. type: str aws_secret_key: aliases: - ec2_secret_key - secret_key description: - C(AWS secret key). If not set then the value of the C(AWS_SECRET_ACCESS_KEY), C(AWS_SECRET_KEY), or C(EC2_SECRET_KEY) environment variable is used. - The I(aws_secret_key) and I(profile) options are mutually exclusive. type: str instance_types: description: - Specify the instance types for a node group. If you specify I(launch_template), then don't specify I(instance_types), or the node group deployment will fail. elements: str type: list scaling_config: default: desired_size: 1 max_size: 2 min_size: 1 description: The scaling configuration details for the Auto Scaling group that is created for your node group. suboptions: desired_size: description: The current number of nodes that the managed node group should maintain. type: int max_size: description: The maximum number of nodes that the managed node group can scale out to. type: int min_size: description: The minimum number of nodes that the managed node group can scale in to. type: int type: dict security_token: aliases: - aws_session_token - session_token - aws_security_token - access_token description: - C(AWS STS security token). If not set then the value of the C(AWS_SECURITY_TOKEN) or C(EC2_SECURITY_TOKEN) environment variable is used. - The I(security_token) and I(profile) options are mutually exclusive. - Aliases I(aws_session_token) and I(session_token) have been added in version 3.2.0. type: str validate_certs: default: true description: - When set to "no", SSL certificates will not be validated for communication with the AWS APIs. type: bool launch_template: description: - An object representing a node group's launch template specification. - If specified, then do not specify I(instanceTypes), I(diskSize), or I(remoteAccess). suboptions: id: description: The ID of the launch template. type: str name: description: The name of the launch template. type: str version: description: - The version of the launch template to use. - If no version is specified, then the template's default version is used. type: str type: dict release_version: description: The AMI version of the Amazon EKS optimized AMI to use with your node group. type: str debug_botocore_endpoint_logs: default: 'no' description: - Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used. type: bool
ami_type: description: This is the AMI type that was specified in the node group configuration. returned: when state is present sample: need_validate type: str capacity_type: description: The capacity type of your managed node group. returned: when state is present sample: need_validate type: str cluster_name: description: Name of EKS Cluster returned: when state is present sample: test_cluster type: str created_at: description: Nodegroup creation date and time. returned: when state is present sample: '2022-01-18T20:00:00.111000+00:00' type: str diskSize: description: This is the disk size in the node group configuration. returned: when state is present sample: 20 type: int health: description: The health status of the node group. returned: when state is present sample: need_validate type: dict instance_types: description: This is the instance type that is associated with the node group. returned: when state is present sample: need_validate type: list labels: description: The Kubernetes labels applied to the nodes in the node group. returned: when state is present sample: need_validate type: dict launch_template: description: 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: need_validate type: dict modified_at: description: Nodegroup modified date and time. returned: when state is present sample: '2022-01-18T20:00:00.111000+00:00' type: str node_role: description: ARN of the IAM Role used by Nodegroup. returned: when state is present sample: arn:aws:eks:us-east-1:1231231123:role/asdf type: str nodegroup_arn: description: The Amazon Resource Name (ARN) associated with the managed node group. returned: when state is present sample: arn:aws:eks:us-east-1:1231231123:safd type: str nodegroup_name: description: The name associated with an Amazon EKS managed node group. returned: when state is present sample: test_cluster type: str release_version: description: This is the version of the Amazon EKS optimized AMI that the node group was deployed with. returned: when state is present sample: need_validate type: str remote_access: description: This is the remote access configuration that is associated with the node group. returned: when state is present sample: need_validate type: dict resources: contains: autoScalingGroups: description: The Auto Scaling groups associated with the node group. elements: dict returned: when state is present type: list remoteAccessSecurityGroup: description: The remote access security group associated with the node group. returned: when state is present type: str description: The resources associated with the node group. returned: when state is present type: complex scaling_config: description: The scaling configuration details for the Auto Scaling group that is associated with your node group. returned: when state is present sample: need_validate type: dict status: description: status of the EKS Nodegroup. returned: when state is present sample: - CREATING - ACTIVE type: str subnets: description: List of subnets used in Fargate Profile. returned: when state is present sample: - subnet-qwerty123 - subnet-asdfg456 type: list tags: description: Nodegroup tags. returned: when state is present sample: foo: bar type: dict taints: description: The Kubernetes taints to be applied to the nodes in the node group when they are created. returned: when state is present sample: need_validate type: list update_config: contains: maxUnavailable: description: The maximum number of nodes unavailable at once during a version update. type: int maxUnavailablePercentage: description: The maximum percentage of nodes unavailable during a version update. type: int description: The node group update configuration. returned: when state is present type: dict version: description: The Kubernetes version of the managed node group. returned: when state is present sample: need_validate type: str