Skip to content
GitHubXDiscordRSS

Addon

Learn how to create, update, and manage AWS EKS Addons using Alchemy Cloud Control.

The Addon resource allows you to manage AWS EKS Addons for enhancing the capabilities of your Kubernetes clusters.

Create a basic EKS Addon with required properties and one optional property.

import AWS from "alchemy/aws/control";
const eksAddon = await AWS.EKS.Addon("basic-eks-addon", {
clusterName: "my-cluster",
addonName: "vpc-cni",
addonVersion: "1.9.0",
serviceAccountRoleArn: "arn:aws:iam::123456789012:role/eks-addon-role"
});

Configure an EKS Addon with additional settings, including tags and preserve on delete functionality.

const advancedEksAddon = await AWS.EKS.Addon("advanced-eks-addon", {
clusterName: "my-cluster",
addonName: "kube-proxy",
addonVersion: "1.23.0",
preserveOnDelete: true,
tags: [
{ key: "Environment", value: "Production" },
{ key: "Team", value: "DevOps" }
]
});

Demonstrate how to configure pod identity associations for an EKS Addon.

const podIdentityAddon = await AWS.EKS.Addon("pod-identity-addon", {
clusterName: "my-cluster",
addonName: "aws-node-termination-handler",
podIdentityAssociations: [
{
namespace: "default",
serviceAccountName: "my-service-account"
}
]
});

Show how to handle conflicts when an EKS Addon already exists.

const conflictHandlingAddon = await AWS.EKS.Addon("conflict-handling-addon", {
clusterName: "my-cluster",
addonName: "cluster-autoscaler",
resolveConflicts: "overwrite",
serviceAccountRoleArn: "arn:aws:iam::123456789012:role/cluster-autoscaler-role"
});