How to create EKS cluster with dedicated host node group

2

I have created a launch template that has the tenancy: Dedicated with the respective host ID. I am using the launch template to create a node group for an EKS cluster but I see an internal error: " EKS couldn't process your request". I can roll up an ec2 instance using the launch template. How can I create a node group using a Dedicated host?

Dolis
asked 2 years ago1778 views
2 Answers
1

Based on the document [1], we can know that only self-managed node group can deploy the container on EC2 dedicated hosts . Which mean that customer need to manually create launch template, auto scaling group, and register it to the EKS cluster. The creation process should be same as general EC2 auto scaling creation. For now, EKS managed node group only supported on-demand and spot.

Here is the point need to be noted: a) According to this document [2], seems like auto scaling group only supported dedicated host resource group. b) When you complete the dedicate host creation [3], please make sure you have purchased dedicated host reservations [4]. c) Make sure you enable the "Auto-placement" on dedicated host [5]. d) Please make sure you have tagged the instance "kubernetes.io/cluster/<cluster-name>: owend".

In the launch template configuration, you just need to configure the instance should run on dedicate host. Due to we have enabled the auto-placement, it would launch on any Dedicated Host that has auto-placement enabled and that matches its instance type.

[1] Amazon EKS nodes - https://docs.aws.amazon.com/eks/latest/userguide/eks-compute.html [2] Dedicated Hosts - Dedicated Hosts restrictions - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html#dedicated-hosts-limitations [3] Work with Dedicated Hosts - Allocate Dedicated Hosts - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-allocating [4] Work with Dedicated Hosts - Purchase Dedicated Host Reservations - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#purchasing-dedicated-host-reservations [5] Work with Dedicated Hosts - Auto-placement - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-auto-placement

Best Regards, Jay

AWS
Jay D
answered 2 years ago
  • I was referring to this doc to create a self-managed node group that specifies creating a node group using a cloud formation template. I am editing the default cloud formation "NodeLaunchTemplate" with below:

    NodeLaunchTemplate: Type: "AWS::EC2::LaunchTemplate" Properties: LaunchTemplateData: BlockDeviceMappings: - DeviceName: /dev/xvda Ebs: DeleteOnTermination: true VolumeSize: !Ref NodeVolumeSize VolumeType: gp2 - Placement: Tenancy: dedicated HostId: h-0c37fc21d3e2cb2*

    But this doesn't work and gives me error "Property validation failure: [Encountered unsupported properties in {/LaunchTemplateData/BlockDeviceMappings/1}: [Placement]]"

    What is the right cloud formation template for dedicated host, if not how can I create a self-managed node group without a cloud formation template?

    Would be great if you can help me with any doc or the steps.

0
Accepted Answer

EKS does not support managed node groups for a dedicated host, we have to implement this using self-managed node groups. The way you can do is already documented in the self-managed section in the EKS docs.(https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html) You will have to add the "Placement" parameters in the properties section (refer below) of the cloudformation template and that it should work:

Properties:
  LaunchTemplateData:
    BlockDeviceMappings:
      - DeviceName: /dev/xvda
        Ebs:
          DeleteOnTermination: true
          VolumeSize: !Ref NodeVolumeSize
          VolumeType: gp2
    Placement:
      Tenancy: host

Thanks!

Dolis
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions