EKS Addons can be used with EKS clusters created using Cluster API Provider AWS.
Addons are supported in EKS clusters using Kubernetes v1.18 or greater.
To install an addon you need to declare them by specifying the name, version and optionally how conflicts should be resolved in the
AWSManagedControlPlane. For example:
kind: AWSManagedControlPlane apiVersion: controlplane.cluster.x-k8s.io/v1beta1 metadata: name: "capi-managed-test-control-plane" spec: region: "eu-west-2" sshKeyName: "capi-management" version: "v1.18.0" addons: - name: "vpc-cni" version: "v1.6.3-eksbuild.1" conflictResolution: "overwrite"
clusterctl generate cluster my-cluster --kubernetes-version v1.18.0 --flavor eks-managedmachinepool-vpccni > my-cluster.yaml
To update the version of an addon you need to edit the
AWSManagedControlPlane instance and update the version of the addon you want to update. Using the example from the previous section we would do:
... addons: - name: "vpc-cni" version: "v1.7.5-eksbuild.1" conflictResolution: "overwrite" ...
To delete an addon from a cluster you need to edit the
AWSManagedControlPlane instance and remove the entry for the addon you want to delete.
You can see what addons are installed on your EKS cluster by looking in the
Status of the
Additionally you can run the following command:
clusterawsadm eks addons list-installed -n <<eksclustername>>
You can see what addons are available to your EKS cluster by running the following command:
clusterawsadm eks addons list-available -n <<eksclustername>>