Skip to content

Instantly share code, notes, and snippets.

@nbrandaleone
Created May 6, 2020 17:47
Show Gist options
  • Select an option

  • Save nbrandaleone/1cf603ced1f8d80b520fa0fbc3a15756 to your computer and use it in GitHub Desktop.

Select an option

Save nbrandaleone/1cf603ced1f8d80b520fa0fbc3a15756 to your computer and use it in GitHub Desktop.
[Looking at User Data for EKS instances] #eks

eksctl generates a UserData script in the Launch Template attached to the node group ASG. You can inspect this UserData for an instances using the following:

$ aws ec2 describe-instance-attribute \
    --attribute userData \
    --instance-id <instance-id> | jq -r .UserData.Value | base64 -d | gzip -d

You'll see the parameter being added into the kubelet.service.d unit files. ExecStart=/usr/bin/kubelet
[...] --max-pods=${MAX_PODS}
[...] Custom Max Pods

You can set this parameter using eksctl when creating a cluster or nodegroup via the --max-pods-per-node parameter:

$ eksctl create ng --help | grep 'max-pods-per-node'
      --max-pods-per-node int          maximum number of pods per node (set automatically if unspecified)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment