Skip to content

docs: Add EKS worker steps to Amazon EC2#543

Open
hhoover wants to merge 1 commit into
flatcar:mainfrom
hhoover:pr/hhoover/eksdoc
Open

docs: Add EKS worker steps to Amazon EC2#543
hhoover wants to merge 1 commit into
flatcar:mainfrom
hhoover:pr/hhoover/eksdoc

Conversation

@hhoover

@hhoover hhoover commented Mar 20, 2026

Copy link
Copy Markdown

Fixes: flatcar/Flatcar#730

This change adds instructions and an example butane config for Flatcar nodes that are used with EKS to documentation

How to use

Run hugo serve, navigate to http://localhost:1313/docs/latest/installing/cloud/aws-ec2/#amazon-eks

Testing done

Loaded the docs locally for review.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@tormath1 tormath1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks a lot for your PR! This whole logic is already handled in the AWS OEM partition but we are bad at maintaining this version mapping: https://github.com/flatcar/scripts/blob/main/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh#L24 I am wondering if we could not find a clever way to maintain this.


* The Amazon EKS Kubelet binary
* The CA Certificate of your EKS cluster (used for cluster authentication)
* The awscli tool

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if that would not make sense to have awscli as part of the AWS OEM partition.

rm -rf /tmp/aws /tmp/awscliv2.zip
fi

# EKS-patched kubelet (must use EKS build, not upstream, for v1beta1 exec credential support)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this is going to be upstreamed at some point?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea, I don't work for Amazon

@hhoover

hhoover commented May 19, 2026

Copy link
Copy Markdown
Author

This whole logic is already handled in the AWS OEM partition but we are bad at maintaining this version mapping

Yeah... folks have been waiting on EKS docs for a WHILE. At least this way a user can fetch the versions they need for EKS without Flatcar having to maintain the version mapping forever.

@hhoover hhoover force-pushed the pr/hhoover/eksdoc branch from 9a2f095 to f4c4600 Compare May 19, 2026 22:29
@hhoover hhoover requested a review from a team as a code owner May 19, 2026 22:29
@hhoover

hhoover commented May 19, 2026

Copy link
Copy Markdown
Author

rebased / added sign off

This change adds instructions and an example butane config
for Flatcar nodes that are used with EKS.

Fixes: flatcar/Flatcar#730
Signed-off-by: Hart Hoover <hart@isovalent.com>
@hhoover hhoover force-pushed the pr/hhoover/eksdoc branch from f4c4600 to c45fc05 Compare May 19, 2026 22:30
@hhoover hhoover requested a review from tormath1 May 19, 2026 22:31
Comment on lines +596 to +612
# IMDSv2
TOKEN=$(curl -sf -X PUT "http://169.254.169.254/latest/api/token" \
-H "X-aws-ec2-metadata-token-ttl-seconds: 21600")

# Node hostname (EKS uses private DNS as node name)
PRIVATE_DNS=$(curl -sf \
-H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/hostname)

# AZ + instance ID for provider-id (required for EKS cloud controller
# to initialize the node and remove the 'uninitialized' taint)
AZ=$(curl -sf \
-H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/placement/availability-zone)
INSTANCE_ID=$(curl -sf \
-H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/instance-id)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this is provided by coreos-metadata.service and available in /run/metadata/flatcar 1 (with a different attribute name):

  • COREOS_EC2_HOSTNAME
  • COREOS_EC2_PUBLIC_HOSTNAME
  • COREOS_EC2_IPV4_LOCAL
  • COREOS_EC2_IPV4_PUBLIC
  • COREOS_EC2_IPV6
  • COREOS_EC2_AVAILABILITY_ZONE
  • COREOS_EC2_INSTANCE_ID
  • COREOS_EC2_INSTANCE_TYPE
  • COREOS_EC2_REGION

Footnotes

  1. https://coreos.github.io/afterburn/usage/attributes/

clusters:
- cluster:
certificate-authority: /etc/kubernetes/pki/ca.crt
server: ${cluster_endpoint}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who's supposed to set this ${cluster_endpoint} value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add documentation on running Flatcar with EKS

2 participants