docs: Add EKS worker steps to Amazon EC2#543
Conversation
tormath1
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Do you know if this is going to be upstreamed at some point?
There was a problem hiding this comment.
no idea, I don't work for Amazon
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. |
9a2f095 to
f4c4600
Compare
|
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>
f4c4600 to
c45fc05
Compare
| # 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) |
There was a problem hiding this comment.
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
| clusters: | ||
| - cluster: | ||
| certificate-authority: /etc/kubernetes/pki/ca.crt | ||
| server: ${cluster_endpoint} |
There was a problem hiding this comment.
Who's supposed to set this ${cluster_endpoint} value?
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-eksTesting done
Loaded the docs locally for review.
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.