create_addon

EKS.Client.create_addon(**kwargs)

Creates an Amazon EKS add-on.

Amazon EKS add-ons help to automate the provisioning and lifecycle management of common operational software for Amazon EKS clusters. For more information, see Amazon EKS add-ons in the Amazon EKS User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_addon(
    clusterName='string',
    addonName='string',
    addonVersion='string',
    serviceAccountRoleArn='string',
    resolveConflicts='OVERWRITE'|'NONE'|'PRESERVE',
    clientRequestToken='string',
    tags={
        'string': 'string'
    },
    configurationValues='string'
)
Parameters
  • clusterName (string) --

    [REQUIRED]

    The name of the cluster to create the add-on for.

  • addonName (string) --

    [REQUIRED]

    The name of the add-on. The name must match one of the names that DescribeAddonVersions returns.

  • addonVersion (string) -- The version of the add-on. The version must match one of the versions returned by DescribeAddonVersions.
  • serviceAccountRoleArn (string) --

    The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide .

    Note

    To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide .

  • resolveConflicts (string) --

    How to resolve field value conflicts for an Amazon EKS add-on. Conflicts are handled based on the value you choose:

    • None – If the self-managed version of the add-on is installed on your cluster, Amazon EKS doesn't change the value. Creation of the add-on might fail.
    • Overwrite – If the self-managed version of the add-on is installed on your cluster and the Amazon EKS default value is different than the existing value, Amazon EKS changes the value to the Amazon EKS default value.
    • Preserve – Not supported. You can set this value when updating an add-on though. For more information, see UpdateAddon.

    If you don't currently have the self-managed version of the add-on installed on your cluster, the Amazon EKS add-on is installed. Amazon EKS sets all values to default values, regardless of the option that you specify.

  • clientRequestToken (string) --

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  • tags (dict) --

    The metadata to apply to the cluster to assist with categorization and organization. Each tag consists of a key and an optional value. You define both.

    • (string) --
      • (string) --
  • configurationValues (string) -- The set of configuration values for the add-on that's created. The values that you provide are validated against the schema in DescribeAddonConfiguration.
Return type

dict

Returns

Response Syntax

{
    'addon': {
        'addonName': 'string',
        'clusterName': 'string',
        'status': 'CREATING'|'ACTIVE'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETE_FAILED'|'DEGRADED'|'UPDATE_FAILED',
        'addonVersion': 'string',
        'health': {
            'issues': [
                {
                    'code': 'AccessDenied'|'InternalFailure'|'ClusterUnreachable'|'InsufficientNumberOfReplicas'|'ConfigurationConflict'|'AdmissionRequestDenied'|'UnsupportedAddonModification'|'K8sResourceNotFound',
                    'message': 'string',
                    'resourceIds': [
                        'string',
                    ]
                },
            ]
        },
        'addonArn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'modifiedAt': datetime(2015, 1, 1),
        'serviceAccountRoleArn': 'string',
        'tags': {
            'string': 'string'
        },
        'publisher': 'string',
        'owner': 'string',
        'marketplaceInformation': {
            'productId': 'string',
            'productUrl': 'string'
        },
        'configurationValues': 'string'
    }
}

Response Structure

  • (dict) --

    • addon (dict) --

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

      • addonName (string) --

        The name of the add-on.

      • clusterName (string) --

        The name of the cluster.

      • status (string) --

        The status of the add-on.

      • addonVersion (string) --

        The version of the add-on.

      • health (dict) --

        An object that represents the health of the add-on.

        • issues (list) --

          An object representing the health issues for an add-on.

          • (dict) --

            An issue related to an add-on.

            • code (string) --

              A code that describes the type of issue.

            • message (string) --

              A message that provides details about the issue and what might cause it.

            • resourceIds (list) --

              The resource IDs of the issue.

              • (string) --
      • addonArn (string) --

        The Amazon Resource Name (ARN) of the add-on.

      • createdAt (datetime) --

        The date and time that the add-on was created.

      • modifiedAt (datetime) --

        The date and time that the add-on was last modified.

      • serviceAccountRoleArn (string) --

        The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes service account that the add-on uses.

      • tags (dict) --

        The metadata that you apply to the add-on to assist with categorization and organization. Each tag consists of a key and an optional value. You define both. Add-on tags do not propagate to any other resources associated with the cluster.

        • (string) --
          • (string) --
      • publisher (string) --

        The publisher of the add-on.

      • owner (string) --

        The owner of the add-on.

      • marketplaceInformation (dict) --

        Information about an Amazon EKS add-on from the Amazon Web Services Marketplace.

        • productId (string) --

          The product ID from the Amazon Web Services Marketplace.

        • productUrl (string) --

          The product URL from the Amazon Web Services Marketplace.

      • configurationValues (string) --

        The configuration values that you provided.

Exceptions

  • EKS.Client.exceptions.InvalidParameterException
  • EKS.Client.exceptions.InvalidRequestException
  • EKS.Client.exceptions.ResourceNotFoundException
  • EKS.Client.exceptions.ResourceInUseException
  • EKS.Client.exceptions.ClientException
  • EKS.Client.exceptions.ServerException