Learn Idem

Learn Idem

Powered by Idem Project

aws.eks.nodegroup

**Autogenerated function**

Deletes an Amazon EKS node group for a cluster.

Args:
    name(Text): An Idem name of EKS Node group.
    cluster_name(Text): The name of the cluster to create the node group in.
    resource_id(Text, optional): AWS EKS Node group name. Idem automatically considers this resource being absent
     if this field is not specified.
    timeout(Dict, optional): Timeout configuration for creating or updating cluster.
        * delete (Dict) -- Timeout configuration for deleting cluster
            * delay -- The amount of time in seconds to wait between attempts.
            * max_attempts -- Customized timeout configuration containing delay and max attempts.
Request Syntax:
    [nodegroup-name]:
          aws.eks.nodegroup.absent:
            - cluster_name: 'string'
            - resource_id: 'string'

Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        nodes1:
          aws.eks.nodegroup.absent:
            - cluster_name: idem-test-cluster
            - resource_id: idem-test-nodegroup
**Autogenerated function**

Describe the resource in a way that can be recreated/managed with the corresponding "present" function


Lists the Amazon EKS managed node groups associated with the specified cluster in your Amazon Web Services
account in the specified Region. Self-managed node groups are not listed.


Returns:
    Dict[str, Any]

Examples:

    .. code-block:: bash

        $ idem describe aws.eks.nodegroup
**Autogenerated function**

Creates a managed node group for an Amazon EKS cluster. 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 Launch template support. An Amazon EKS
managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by
Amazon Web Services for an Amazon EKS cluster. Each node group uses a version of the Amazon EKS optimized Amazon
Linux 2 AMI. For more information, see Managed Node Groups in the Amazon EKS User Guide.

Args:
    name(Text): An Idem name of EKS Node group.
    cluster_name(Text): The name of the cluster to create the node group in.
    subnets(List[str]): The subnets to use for the Auto Scaling group that is created for your node group. If you
        specify launchTemplate, then don't specify  SubnetId  in your launch template, 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.
    node_role(Text): 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 Amazon Web Services 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.
    resource_id(Text, optional): AWS EKS Node group name
    scaling_config(Dict[str, Any], optional): The scaling configuration details for the Auto Scaling group that is created for your node
        group. Defaults to None.
        * minSize (int, optional): The minimum number of nodes that the managed node group can scale in to.
        * maxSize (int, optional): The maximum number of nodes that the managed node group can scale out to. For information about
            the maximum number that you can specify, see Amazon EKS service quotas in the Amazon EKS User
            Guide.
        * desiredSize (int, optional): The current number of nodes that the managed node group should maintain.  If you use Cluster
            Autoscaler, you shouldn't change the desiredSize value directly, as this can cause the Cluster
            Autoscaler to suddenly scale up or scale down.  Whenever this parameter changes, the number of
            worker nodes in the node group is updated to the specified size. If this parameter is given a
            value that is smaller than the current number of running worker nodes, the necessary number of
            worker nodes are terminated to match the given value. When using CloudFormation, no action
            occurs if you remove this parameter from your CFN template. This parameter can be different from
            minSize in some cases, such as when starting with extra hosts for testing. This parameter can
            also be different when you want to start with an estimated number of needed hosts, but let
            Cluster Autoscaler reduce the number if there are too many. When Cluster Autoscaler is used, the
            desiredSize parameter is altered by Cluster Autoscaler (but can be out-of-date for short periods
            of time). Cluster Autoscaler doesn't scale a managed node group lower than minSize or higher
            than maxSize.
    capacity_type(Text, optional): The capacity type for your node group
    disk_size(integer, optional): The root device disk size (in GiB) for your node group instances. The default
        disk size is 20 GiB.
    instance_types(List[str], optional): Specify the instance types for a node group. If you specify a GPU instance type, be sure to
        specify AL2_x86_64_GPU with the amiType parameter. If you specify launchTemplate, then you can
        specify zero or one instance type in your launch template or you can specify 0-20 instance types
        for instanceTypes. If however, you specify an instance type in your launch template and specify
        any instanceTypes, the node group deployment will fail. If you don't specify an instance type in
        a launch template or for instanceTypes, then t3.medium is used, by default. If you specify Spot
        for capacityType, then we recommend specifying multiple values for instanceTypes. For more
        information, see Managed node group capacity types and Launch template support in the Amazon EKS
        User Guide. Defaults to None.
    ami_type(Text, optional): The AMI type for your node group. GPU instance types should use the AL2_x86_64_GPU
        AMI type. Non-GPU instances should use the AL2_x86_64 AMI type. Arm instances should use the AL2_ARM_64 AMI
        type.
    remote_access(Dict[str, Any], optional): The remote access (SSH) configuration to use with your node group. If you specify
        launchTemplate, then don't specify remoteAccess, 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. Defaults to None.
        * ec2SshKey (str, optional): The Amazon EC2 SSH key that provides access for SSH communication with the nodes in the managed
            node group. For more information, see Amazon EC2 key pairs and Linux instances in the Amazon
            Elastic Compute Cloud User Guide for Linux Instances.
        * sourceSecurityGroups (List[str], optional): The security groups that are allowed SSH access (port 22) to the nodes. If you specify an Amazon
            EC2 SSH key but do not specify a source security group when you create a managed node group,
            then port 22 on the nodes is opened to the internet (0.0.0.0/0). For more information, see
            Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.
    labels(Dict[str, str], optional): The Kubernetes labels to be applied to the nodes in the node group when they are created. Defaults to None.
    taints(List[Dict[str, Any]], optional): The Kubernetes taints to be applied to the nodes in the node group. For more information, see
        Node taints on managed node groups. Defaults to None.
        * key (str, optional): The key of the taint.
        * value (str, optional): The value of the taint.
        * effect (str, optional): The effect of the taint.
    tags(Dict, optional): The metadata to apply to the node group to assist with categorization and organization.
        Each tag consists of a key and an optional value. You define both. Node group tags do not propagate to any
        other resources associated with the node group, such as the Amazon EC2 instances or subnets.
    client_request_token(Text, optional): Unique, case-sensitive identifier that you provide to ensure the
        idempotency of the request.
    launch_template(Dict[str, Any], optional): An object representing a node group's launch template specification. If specified, then do not
        specify instanceTypes, diskSize, or remoteAccess and make sure that the launch template meets
        the requirements in launchTemplateSpecification. Defaults to None.
        * name (str, optional): The name of the launch template.
        * version (str, optional): The version of the launch template to use. If no version is specified, then the template's
            default version is used.
        * id (str, optional): The ID of the launch template.
    update_config(Dict[str, Any], optional): The node group update configuration. Defaults to None.
        * maxUnavailable (int, optional): The maximum number of nodes unavailable at once during a version update. Nodes will be updated
            in parallel. This value or maxUnavailablePercentage is required to have a value.The maximum
            number is 100.
        * maxUnavailablePercentage (int, optional): The maximum percentage of nodes unavailable during a version update. This percentage of nodes
            will be updated in parallel, up to 100 nodes at once. This value or maxUnavailable is required
            to have a value.
    version(str, optional): 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 launchTemplate,
        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. Defaults to None.
    release_version(str, optional): The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the
        latest available AMI version for the node group's current Kubernetes version is used. For more
        information, see Amazon EKS optimized Amazon Linux 2 AMI versions in the Amazon EKS User Guide.
        If you specify launchTemplate, and your launch template uses a custom AMI, then don't specify
        releaseVersion, 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. Defaults to None.
    timeout(Dict, optional): Timeout configuration for creating or updating nodegroup.
        * create (Dict) -- Timeout configuration for creating nodegroup
            * delay(int, default=30) -- The amount of time in seconds to wait between attempts.
            * max_attempts(int, default=80) -- Customized timeout configuration containing delay and max attempts.
        * update (string) -- Timeout configuration for updating nodegroup
            * delay(int, default=30) -- The amount of time in seconds to wait between attempts.
            * max_attempts(int, default=80) -- Customized timeout configuration containing delay and max attempts.

Request Syntax:

    [eks-nodegroup-name]:
          aws.eks.nodegroup.present:
          - cluster_name: 'string'
          - node_group_arn: 'string'
          - version: 'string'
          - release_version: 'string'
          - resource_id: 'string'
          - status: 'string'
          - capacity_type: 'ON_DEMAND' | 'SPOT',
          - instance_types:
            - 'string'
          - subnets:
            - 'string'
          - ami_type: 'string'
          - node_role: 'string'
          - disk_size: int
          - scaling_config:
              desiredSize: int
              maxSize: int
              minSize: int
          - update_config:
              maxUnavailable: int
          - tags:
              - 'string': 'string'
Returns:
    Dict[str, Any]

Examples:

    .. code-block:: sls

        nodes1:
          aws.eks.nodegroup.present:
          - cluster_name: idem-test-cluster
          - node_group_arn: arn:aws:eks:us-west-2:000000000000:nodegroup/prod/idem-test-instance-e1a573b9-4e74-48f0-85c4-c214a8ec8ada/id123
          - version: '1.21'
          - release_version: 1.21.5-20220123
          - resource_id: 'idem-test-cluster-node-group'
          - status: ACTIVE
          - capacity_type: ON_DEMAND
          - instance_types:
            - t1.micro
          - subnets:
            - subnet-31813031
          - ami_type: AL2_x86_64
          - node_role: arn:aws:iam::000000000000:role/idem-test-role-2075a427-24c2-4021-abc3-9b542834addb
          - disk_size: 20
          - scaling_config:
              desiredSize: 2
              maxSize: 2
              minSize: 2
          - update_config:
              maxUnavailable: 1
          - tags:
              - Name: idem-test-instance-e1a573b9-4e74-48f0-85c4-c214a8ec8ada

Full plugin documentation is available on the Idem documentation site - aws.eks.nodegroup .

Last updated on 20 Sep 2022
 Edit on GitHub