sigs.k8s.io/cluster-api-provider-aws@v1.5.5/bootstrap/eks/README.md (about) 1 # Cluster API bootstrap provider EKS 2 3 Cluster API bootstrap provider EKS (CABPE) is a component of [Cluster API](https://github.com/kubernetes-sigs/cluster-api/blob/main/README.md) that is responsible for generating a cloud-init script to turn a Machine into a Kubernetes Node; this implementation uses the [AWS-provided EKS bootstrap script](https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh) for joining Kubernetes Nodes to EKS clusters. 4 5 CABPE is the bootstrap component of Cluster API Provider AWS' (CAPA) EKS ecosystem. This ecosystem is comprised of: 6 - EKS controlplane provider (AWSManagedControlPlane) 7 - AWS infrastructure provider (AWSMachine, AWSMachineTemplate, AWSMachinePool) 8 - EKS bootstrap provider (EKSConfig, EKSConfigTemplate) 9 10 ## How does CABPE work? 11 12 CABPE generates cloud-init configuration that CAPA will use as the [user-data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) for new EC2 instances. The generated configuration relies on the `bootstrap.sh` script that is present on all official AWS EKS AMIs. 13 14 The output script looks something like this (assuming an EKS cluster with the name `my-cluster`): 15 16 ```bash 17 #!/bin/bash 18 /etc/eks/bootstrap.sh my-cluster 19 ``` 20 21 CAPA will look up the official EKS AMI for a particular Kubernetes version if the AMI is not overriden in the AWSMachine object. In order for this bootstrap provider to function, any user-specified AMIs will need to have `/etc/eks/bootstrap.sh` present (script source linked above). 22 23 Because the bootstrap script has no required fields other than the EKS cluster's name, which can be derived, an `EKSConfig` object with an empty `spec` is acceptable: 24 25 ```yaml 26 kind: EKSConfig 27 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 28 metadata: 29 name: my-config 30 spec: {} 31 ``` 32 33 The only configuration option available is `kubeletExtraArgs`, which is a `map[string]string`: 34 35 ```yaml 36 kind: EKSConfig 37 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 38 metadata: 39 name: my-config 40 spec: 41 kubeletExtraArgs: 42 image-gc-high-threshold: "50" 43 image-gc-low-threshold: "40" 44 minimum-container-ttl-duration: "1m" 45 ``` 46 47 This will produce the following: 48 49 ```bash 50 #!/bin/bash 51 /etc/eks/bootstrap.sh my-cluster --kubelet-extra-args '--image-gc-high-threshold=50 --image-gc-low-threshold=45 --minimum-container-ttl-duration=1m' 52 ``` 53 54 This script will join the Node using the specified `kubelet` arguments.