DeleteAddonCommand

Deletes an Amazon EKS add-on.

When you remove an add-on, it's deleted from the cluster. You can always manually start an add-on on the cluster using the Kubernetes API.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EKSClient, DeleteAddonCommand } from "@aws-sdk/client-eks"; // ES Modules import
// const { EKSClient, DeleteAddonCommand } = require("@aws-sdk/client-eks"); // CommonJS import
const client = new EKSClient(config);
const input = { // DeleteAddonRequest
  clusterName: "STRING_VALUE", // required
  addonName: "STRING_VALUE", // required
  preserve: true || false,
};
const command = new DeleteAddonCommand(input);
const response = await client.send(command);
// { // DeleteAddonResponse
//   addon: { // Addon
//     addonName: "STRING_VALUE",
//     clusterName: "STRING_VALUE",
//     status: "CREATING" || "ACTIVE" || "CREATE_FAILED" || "UPDATING" || "DELETING" || "DELETE_FAILED" || "DEGRADED" || "UPDATE_FAILED",
//     addonVersion: "STRING_VALUE",
//     health: { // AddonHealth
//       issues: [ // AddonIssueList
//         { // AddonIssue
//           code: "AccessDenied" || "InternalFailure" || "ClusterUnreachable" || "InsufficientNumberOfReplicas" || "ConfigurationConflict" || "AdmissionRequestDenied" || "UnsupportedAddonModification" || "K8sResourceNotFound" || "AddonSubscriptionNeeded" || "AddonPermissionFailure",
//           message: "STRING_VALUE",
//           resourceIds: [ // StringList
//             "STRING_VALUE",
//           ],
//         },
//       ],
//     },
//     addonArn: "STRING_VALUE",
//     createdAt: new Date("TIMESTAMP"),
//     modifiedAt: new Date("TIMESTAMP"),
//     serviceAccountRoleArn: "STRING_VALUE",
//     tags: { // TagMap
//       "<keys>": "STRING_VALUE",
//     },
//     publisher: "STRING_VALUE",
//     owner: "STRING_VALUE",
//     marketplaceInformation: { // MarketplaceInformation
//       productId: "STRING_VALUE",
//       productUrl: "STRING_VALUE",
//     },
//     configurationValues: "STRING_VALUE",
//     podIdentityAssociations: [
//       "STRING_VALUE",
//     ],
//   },
// };

DeleteAddonCommand Input

See DeleteAddonCommandInput for more details

Parameter
Type
Description
addonName
Required
string | undefined

The name of the add-on. The name must match one of the names returned by ListAddons  .

clusterName
Required
string | undefined

The name of your cluster.

preserve
boolean | undefined

Specifying this option preserves the add-on software on your cluster but Amazon EKS stops managing any settings for the add-on. If an IAM account is associated with the add-on, it isn't removed.

DeleteAddonCommand Output

See DeleteAddonCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
addon
Addon | undefined

An Amazon EKS add-on. For more information, see Amazon EKS add-ons  in the Amazon EKS User Guide.

Throws

Name
Fault
Details
ClientException
client

These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an IAM principal  that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.

InvalidParameterException
client

The specified parameter is invalid. Review the available parameters for the API request.

InvalidRequestException
client

The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.

ResourceNotFoundException
client

The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific.

ServerException
server

These errors are usually caused by a server-side issue.

EKSServiceException
Base exception class for all service exceptions from EKS service.