Class: AWS.EKS

Inherits:
AWS.Service show all
Identifier:
eks
API Version:
2017-11-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon Elastic Container Service for Kubernetes (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on AWS without needing to stand up or maintain your own Kubernetes control plane. Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications.

Amazon EKS runs up-to-date versions of the open-source Kubernetes software, so you can use all the existing plugins and tooling from the Kubernetes community. Applications running on Amazon EKS are fully compatible with applications running on any standard Kubernetes environment, whether running in on-premises data centers or public clouds. This means that you can easily migrate any standard Kubernetes application to Amazon EKS without any code modification required.

Sending a Request Using EKS

var eks = new AWS.EKS();
eks.createCluster(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the EKS object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var eks = new AWS.EKS({apiVersion: '2017-11-01'});

You can also set the API version globally in AWS.config.apiVersions using the eks service identifier:

AWS.config.apiVersions = {
  eks: '2017-11-01',
  // other service API versions
};

var eks = new AWS.EKS();

Version:

  • 2017-11-01

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

clusterActive, clusterDeleted

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.EKS(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a EKS object

var eks = new AWS.EKS({apiVersion: '2017-11-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.EKS.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.EKS.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.EKS.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createCluster(params = {}, callback) ⇒ AWS.Request

Creates an Amazon EKS control plane.

The Amazon EKS control plane consists of control plane instances that run the Kubernetes software, like etcd and the API server. The control plane runs in an account managed by AWS, and the Kubernetes API is exposed via the Amazon EKS API server endpoint. Each Amazon EKS cluster control plane is single-tenant and unique, and runs on its own set of Amazon EC2 instances.

The cluster control plane is provisioned across multiple Availability Zones and fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC subnets to provide connectivity from the control plane instances to the worker nodes (for example, to support kubectl exec, logs, and proxy data flows).

Amazon EKS worker nodes run in your AWS account and connect to your cluster's control plane via the Kubernetes API server endpoint and a certificate file that is created for your cluster.

You can use the endpointPublicAccess and endpointPrivateAccess parameters to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled and private access is disabled. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

You can use the logging parameter to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs are not exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide .

Note: CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see Amazon CloudWatch Pricing.

Cluster creation typically takes between 10 and 15 minutes. After you create an Amazon EKS cluster, you must configure your Kubernetes tooling to communicate with the API server and launch worker nodes into your cluster. For more information, see Managing Cluster Authentication and Launching Amazon EKS Worker Nodes in the Amazon EKS User Guide.

Service Reference:

Examples:

To create a new cluster


/* The following example creates an Amazon EKS cluster called prod. */

 var params = {
  version: "1.10", 
  name: "prod", 
  clientRequestToken: "1d2129a1-3d38-460a-9756-e5b91fddb951", 
  resourcesVpcConfig: {
   securityGroupIds: [
      "sg-6979fe18"
   ], 
   subnetIds: [
      "subnet-6782e71e", 
      "subnet-e7e761ac"
   ]
  }, 
  roleArn: "arn:aws:iam::012345678910:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI"
 };
 eks.createCluster(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the createCluster operation

var params = {
  name: 'STRING_VALUE', /* required */
  resourcesVpcConfig: { /* required */
    endpointPrivateAccess: true || false,
    endpointPublicAccess: true || false,
    securityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    subnetIds: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  roleArn: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE',
  logging: {
    clusterLogging: [
      {
        enabled: true || false,
        types: [
          api | audit | authenticator | controllerManager | scheduler,
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  version: 'STRING_VALUE'
};
eks.createCluster(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The unique name to give to your cluster.

    • version — (String)

      The desired Kubernetes version for your cluster. If you do not specify a value here, the latest version available in Amazon EKS is used.

    • roleArn — (String)

      The Amazon Resource Name (ARN) of the IAM role that provides permissions for Amazon EKS to make calls to other AWS API operations on your behalf. For more information, see Amazon EKS Service IAM Role in the Amazon EKS User Guide .

    • resourcesVpcConfig — (map)

      The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide. You must specify at least two subnets. You may specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.

      • subnetIds — (Array<String>)

        Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.

      • securityGroupIds — (Array<String>)

        Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you do not specify a security group, the default security group for your VPC is used.

      • endpointPublicAccess — (Boolean)

        Set this value to false to disable public access for your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

      • endpointPrivateAccess — (Boolean)

        Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC will use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

    • logging — (map)

      Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs are not exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide .

      Note: CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see Amazon CloudWatch Pricing.
      • clusterLogging — (Array<map>)

        The cluster control plane logging configuration for your cluster.

        • types — (Array<String>)

          The available cluster control plane log types.

        • enabled — (Boolean)

          If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

    • clientRequestToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • cluster — (map)

        The full description of your new cluster.

        • name — (String)

          The name of the cluster.

        • arn — (String)

          The Amazon Resource Name (ARN) of the cluster.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the cluster was created.

        • version — (String)

          The Kubernetes server version for the cluster.

        • endpoint — (String)

          The endpoint for your Kubernetes API server.

        • roleArn — (String)

          The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

        • resourcesVpcConfig — (map)

          The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide.

          • subnetIds — (Array<String>)

            The subnets associated with your cluster.

          • securityGroupIds — (Array<String>)

            The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

          • vpcId — (String)

            The VPC associated with your cluster.

          • endpointPublicAccess — (Boolean)

            This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can only receive requests that originate from within the cluster VPC.

          • endpointPrivateAccess — (Boolean)

            This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC will use the private VPC endpoint instead of traversing the internet.

        • logging — (map)

          The logging configuration for your cluster.

          • clusterLogging — (Array<map>)

            The cluster control plane logging configuration for your cluster.

            • types — (Array<String>)

              The available cluster control plane log types.

            • enabled — (Boolean)

              If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

        • status — (String)

          The current status of the cluster.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
          • "FAILED"
        • certificateAuthority — (map)

          The certificate-authority-data for your cluster.

          • data — (String)

            The base64 encoded certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.

        • clientRequestToken — (String)

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

        • platformVersion — (String)

          The platform version of your Amazon EKS cluster. For more information, see Platform Versions in the Amazon EKS User Guide .

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCluster(params = {}, callback) ⇒ AWS.Request

Deletes the Amazon EKS cluster control plane.

Note: If you have active services in your cluster that are associated with a load balancer, you must delete those services before deleting the cluster so that the load balancers are deleted properly. Otherwise, you can have orphaned resources in your VPC that prevent you from being able to delete the VPC. For more information, see Deleting a Cluster in the Amazon EKS User Guide.

Service Reference:

Examples:

To delete a cluster


/* This example command deletes a cluster named `devel` in your default region. */

 var params = {
  name: "devel"
 };
 eks.deleteCluster(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
   }
   */
 });

Calling the deleteCluster operation

var params = {
  name: 'STRING_VALUE' /* required */
};
eks.deleteCluster(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the cluster to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • cluster — (map)

        The full description of the cluster to delete.

        • name — (String)

          The name of the cluster.

        • arn — (String)

          The Amazon Resource Name (ARN) of the cluster.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the cluster was created.

        • version — (String)

          The Kubernetes server version for the cluster.

        • endpoint — (String)

          The endpoint for your Kubernetes API server.

        • roleArn — (String)

          The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

        • resourcesVpcConfig — (map)

          The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide.

          • subnetIds — (Array<String>)

            The subnets associated with your cluster.

          • securityGroupIds — (Array<String>)

            The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

          • vpcId — (String)

            The VPC associated with your cluster.

          • endpointPublicAccess — (Boolean)

            This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can only receive requests that originate from within the cluster VPC.

          • endpointPrivateAccess — (Boolean)

            This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC will use the private VPC endpoint instead of traversing the internet.

        • logging — (map)

          The logging configuration for your cluster.

          • clusterLogging — (Array<map>)

            The cluster control plane logging configuration for your cluster.

            • types — (Array<String>)

              The available cluster control plane log types.

            • enabled — (Boolean)

              If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

        • status — (String)

          The current status of the cluster.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
          • "FAILED"
        • certificateAuthority — (map)

          The certificate-authority-data for your cluster.

          • data — (String)

            The base64 encoded certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.

        • clientRequestToken — (String)

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

        • platformVersion — (String)

          The platform version of your Amazon EKS cluster. For more information, see Platform Versions in the Amazon EKS User Guide .

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeCluster(params = {}, callback) ⇒ AWS.Request

Returns descriptive information about an Amazon EKS cluster.

The API server endpoint and certificate authority data returned by this operation are required for kubelet and kubectl to communicate with your Kubernetes API server. For more information, see Create a kubeconfig for Amazon EKS.

Note: The API server endpoint and certificate authority data are not available until the cluster reaches the ACTIVE state.

Service Reference:

Examples:

To describe a cluster


/* This example command provides a description of the specified cluster in your default region. */

 var params = {
  name: "devel"
 };
 eks.describeCluster(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    cluster: {
     version: "1.10", 
     name: "devel", 
     arn: "arn:aws:eks:us-west-2:012345678910:cluster/devel", 
     certificateAuthority: {
      data: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNE1EVXpNVEl6TVRFek1Wb1hEVEk0TURVeU9ESXpNVEV6TVZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTTZWCjVUaG4rdFcySm9Xa2hQMzRlVUZMNitaRXJOZGIvWVdrTmtDdWNGS2RaaXl2TjlMVmdvUmV2MjlFVFZlN1ZGbSsKUTJ3ZURyRXJiQyt0dVlibkFuN1ZLYmE3ay9hb1BHekZMdmVnb0t6b0M1N2NUdGVwZzRIazRlK2tIWHNaME10MApyb3NzcjhFM1ROeExETnNJTThGL1cwdjhsTGNCbWRPcjQyV2VuTjFHZXJnaDNSZ2wzR3JIazBnNTU0SjFWenJZCm9hTi8zODFUczlOTFF2QTBXb0xIcjBFRlZpTFdSZEoyZ3lXaC9ybDVyOFNDOHZaQXg1YW1BU0hVd01aTFpWRC8KTDBpOW4wRVM0MkpVdzQyQmxHOEdpd3NhTkJWV3lUTHZKclNhRXlDSHFtVVZaUTFDZkFXUjl0L3JleVVOVXM3TApWV1FqM3BFbk9RMitMSWJrc0RzQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFNZ3RsQ1dIQ2U2YzVHMXl2YlFTS0Q4K2hUalkKSm1NSG56L2EvRGt0WG9YUjFVQzIrZUgzT1BZWmVjRVZZZHVaSlZCckNNQ2VWR0ZkeWdBYlNLc1FxWDg0S2RXbAp1MU5QaERDSmEyRHliN2pVMUV6VThTQjFGZUZ5ZFE3a0hNS1E1blpBRVFQOTY4S01hSGUrSm0yQ2x1UFJWbEJVCjF4WlhTS1gzTVZ0K1Q0SU1EV2d6c3JRSjVuQkRjdEtLcUZtM3pKdVVubHo5ZEpVckdscEltMjVJWXJDckxYUFgKWkUwRUtRNWEzMHhkVWNrTHRGQkQrOEtBdFdqSS9yZUZPNzM1YnBMdVoyOTBaNm42QlF3elRrS0p4cnhVc3QvOAppNGsxcnlsaUdWMm5SSjBUYjNORkczNHgrYWdzYTRoSTFPbU90TFM0TmgvRXJxT3lIUXNDc2hEQUtKUT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
     }, 
     createdAt: <Date Representation>, 
     endpoint: "https://A0DCCD80A04F01705DD065655C30CC3D.yl4.us-west-2.eks.amazonaws.com", 
     resourcesVpcConfig: {
      securityGroupIds: [
         "sg-6979fe18"
      ], 
      subnetIds: [
         "subnet-6782e71e", 
         "subnet-e7e761ac"
      ], 
      vpcId: "vpc-950809ec"
     }, 
     roleArn: "arn:aws:iam::012345678910:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI", 
     status: "ACTIVE"
    }
   }
   */
 });

Calling the describeCluster operation

var params = {
  name: 'STRING_VALUE' /* required */
};
eks.describeCluster(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the cluster to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • cluster — (map)

        The full description of your specified cluster.

        • name — (String)

          The name of the cluster.

        • arn — (String)

          The Amazon Resource Name (ARN) of the cluster.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the cluster was created.

        • version — (String)

          The Kubernetes server version for the cluster.

        • endpoint — (String)

          The endpoint for your Kubernetes API server.

        • roleArn — (String)

          The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

        • resourcesVpcConfig — (map)

          The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide.

          • subnetIds — (Array<String>)

            The subnets associated with your cluster.

          • securityGroupIds — (Array<String>)

            The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

          • vpcId — (String)

            The VPC associated with your cluster.

          • endpointPublicAccess — (Boolean)

            This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can only receive requests that originate from within the cluster VPC.

          • endpointPrivateAccess — (Boolean)

            This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC will use the private VPC endpoint instead of traversing the internet.

        • logging — (map)

          The logging configuration for your cluster.

          • clusterLogging — (Array<map>)

            The cluster control plane logging configuration for your cluster.

            • types — (Array<String>)

              The available cluster control plane log types.

            • enabled — (Boolean)

              If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

        • status — (String)

          The current status of the cluster.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
          • "FAILED"
        • certificateAuthority — (map)

          The certificate-authority-data for your cluster.

          • data — (String)

            The base64 encoded certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.

        • clientRequestToken — (String)

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

        • platformVersion — (String)

          The platform version of your Amazon EKS cluster. For more information, see Platform Versions in the Amazon EKS User Guide .

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeUpdate(params = {}, callback) ⇒ AWS.Request

Returns descriptive information about an update against your Amazon EKS cluster.

When the status of the update is Succeeded, the update is complete. If an update fails, the status is Failed, and an error detail explains the reason for the failure.

Service Reference:

Examples:

Calling the describeUpdate operation

var params = {
  name: 'STRING_VALUE', /* required */
  updateId: 'STRING_VALUE' /* required */
};
eks.describeUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the Amazon EKS cluster to update.

    • updateId — (String)

      The ID of the update to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • update — (map)

        The full description of the specified update.

        • id — (String)

          A UUID that is used to track the update.

        • status — (String)

          The current status of the update.

          Possible values include:
          • "InProgress"
          • "Failed"
          • "Cancelled"
          • "Successful"
        • type — (String)

          The type of the update.

          Possible values include:
          • "VersionUpdate"
          • "EndpointAccessUpdate"
          • "LoggingUpdate"
        • params — (Array<map>)

          A key-value map that contains the parameters associated with the update.

          • type — (String)

            The keys associated with an update request.

            Possible values include:
            • "Version"
            • "PlatformVersion"
            • "EndpointPrivateAccess"
            • "EndpointPublicAccess"
            • "ClusterLogging"
          • value — (String)

            The value of the keys submitted as part of an update request.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the update was created.

        • errors — (Array<map>)

          Any errors associated with a Failed update.

          • errorCode — (String)

            A brief description of the error.

            • SubnetNotFound: One of the subnets associated with the cluster could not be found.

            • SecurityGroupNotFound: One of the security groups associated with the cluster could not be found.

            • EniLimitReached: You have reached the elastic network interface limit for your account.

            • IpNotAvailable: A subnet associated with the cluster does not have any free IP addresses.

            • AccessDenied: You do not have permissions to perform the specified operation.

            • OperationNotPermitted: The service role associated with the cluster does not have the required access permissions for Amazon EKS.

            • VpcIdNotFound: The VPC associated with the cluster could not be found.

            Possible values include:
            • "SubnetNotFound"
            • "SecurityGroupNotFound"
            • "EniLimitReached"
            • "IpNotAvailable"
            • "AccessDenied"
            • "OperationNotPermitted"
            • "VpcIdNotFound"
            • "Unknown"
          • errorMessage — (String)

            A more complete description of the error.

          • resourceIds — (Array<String>)

            An optional field that contains the resource IDs associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listClusters(params = {}, callback) ⇒ AWS.Request

Lists the Amazon EKS clusters in your AWS account in the specified Region.

Service Reference:

Examples:

To list your available clusters


/* This example command lists all of your available clusters in your default region. */

 var params = {
 };
 eks.listClusters(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    clusters: [
       "devel", 
       "prod"
    ]
   }
   */
 });

Calling the listClusters operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
eks.listClusters(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxResults — (Integer)

      The maximum number of cluster results returned by ListClusters in paginated output. When this parameter is used, ListClusters only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListClusters request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, then ListClusters returns up to 100 results and a nextToken value if applicable.

    • nextToken — (String)

      The nextToken value returned from a previous paginated ListClusters request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

      Note: This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • clusters — (Array<String>)

        A list of all of the clusters for your account in the specified Region.

      • nextToken — (String)

        The nextToken value to include in a future ListClusters request. When the results of a ListClusters request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listUpdates(params = {}, callback) ⇒ AWS.Request

Lists the updates associated with an Amazon EKS cluster in your AWS account, in the specified Region.

Service Reference:

Examples:

Calling the listUpdates operation

var params = {
  name: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
eks.listUpdates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the Amazon EKS cluster for which to list updates.

    • nextToken — (String)

      The nextToken value returned from a previous paginated ListUpdates request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

    • maxResults — (Integer)

      The maximum number of update results returned by ListUpdates in paginated output. When this parameter is used, ListUpdates only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListUpdates request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, then ListUpdates returns up to 100 results and a nextToken value if applicable.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • updateIds — (Array<String>)

        A list of all the updates for the specified cluster and Region.

      • nextToken — (String)

        The nextToken value to include in a future ListUpdates request. When the results of a ListUpdates request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateClusterConfig(params = {}, callback) ⇒ AWS.Request

Updates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with the DescribeUpdate API operation.

You can use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled and private access is disabled. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

You can also use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs are not exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide .

Note: CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see Amazon CloudWatch Pricing.

Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to UPDATING (this status transition is eventually consistent). When the update is complete (either Failed or Successful), the cluster status moves to Active.

Service Reference:

Examples:

Calling the updateClusterConfig operation

var params = {
  name: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE',
  logging: {
    clusterLogging: [
      {
        enabled: true || false,
        types: [
          api | audit | authenticator | controllerManager | scheduler,
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  resourcesVpcConfig: {
    endpointPrivateAccess: true || false,
    endpointPublicAccess: true || false,
    securityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    subnetIds: [
      'STRING_VALUE',
      /* more items */
    ]
  }
};
eks.updateClusterConfig(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the Amazon EKS cluster to update.

    • resourcesVpcConfig — (map)

      An object representing the VPC configuration to use for an Amazon EKS cluster.

      • subnetIds — (Array<String>)

        Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.

      • securityGroupIds — (Array<String>)

        Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you do not specify a security group, the default security group for your VPC is used.

      • endpointPublicAccess — (Boolean)

        Set this value to false to disable public access for your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

      • endpointPrivateAccess — (Boolean)

        Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC will use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

    • logging — (map)

      Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs are not exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide .

      Note: CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see Amazon CloudWatch Pricing.
      • clusterLogging — (Array<map>)

        The cluster control plane logging configuration for your cluster.

        • types — (Array<String>)

          The available cluster control plane log types.

        • enabled — (Boolean)

          If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

    • clientRequestToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • update — (map)

        An object representing an asynchronous update.

        • id — (String)

          A UUID that is used to track the update.

        • status — (String)

          The current status of the update.

          Possible values include:
          • "InProgress"
          • "Failed"
          • "Cancelled"
          • "Successful"
        • type — (String)

          The type of the update.

          Possible values include:
          • "VersionUpdate"
          • "EndpointAccessUpdate"
          • "LoggingUpdate"
        • params — (Array<map>)

          A key-value map that contains the parameters associated with the update.

          • type — (String)

            The keys associated with an update request.

            Possible values include:
            • "Version"
            • "PlatformVersion"
            • "EndpointPrivateAccess"
            • "EndpointPublicAccess"
            • "ClusterLogging"
          • value — (String)

            The value of the keys submitted as part of an update request.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the update was created.

        • errors — (Array<map>)

          Any errors associated with a Failed update.

          • errorCode — (String)

            A brief description of the error.

            • SubnetNotFound: One of the subnets associated with the cluster could not be found.

            • SecurityGroupNotFound: One of the security groups associated with the cluster could not be found.

            • EniLimitReached: You have reached the elastic network interface limit for your account.

            • IpNotAvailable: A subnet associated with the cluster does not have any free IP addresses.

            • AccessDenied: You do not have permissions to perform the specified operation.

            • OperationNotPermitted: The service role associated with the cluster does not have the required access permissions for Amazon EKS.

            • VpcIdNotFound: The VPC associated with the cluster could not be found.

            Possible values include:
            • "SubnetNotFound"
            • "SecurityGroupNotFound"
            • "EniLimitReached"
            • "IpNotAvailable"
            • "AccessDenied"
            • "OperationNotPermitted"
            • "VpcIdNotFound"
            • "Unknown"
          • errorMessage — (String)

            A more complete description of the error.

          • resourceIds — (Array<String>)

            An optional field that contains the resource IDs associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateClusterVersion(params = {}, callback) ⇒ AWS.Request

Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with the DescribeUpdate API operation.

Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to UPDATING (this status transition is eventually consistent). When the update is complete (either Failed or Successful), the cluster status moves to Active.

Service Reference:

Examples:

Calling the updateClusterVersion operation

var params = {
  name: 'STRING_VALUE', /* required */
  version: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE'
};
eks.updateClusterVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the Amazon EKS cluster to update.

    • version — (String)

      The desired Kubernetes version following a successful update.

    • clientRequestToken — (String)

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

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • update — (map)

        The full description of the specified update

        • id — (String)

          A UUID that is used to track the update.

        • status — (String)

          The current status of the update.

          Possible values include:
          • "InProgress"
          • "Failed"
          • "Cancelled"
          • "Successful"
        • type — (String)

          The type of the update.

          Possible values include:
          • "VersionUpdate"
          • "EndpointAccessUpdate"
          • "LoggingUpdate"
        • params — (Array<map>)

          A key-value map that contains the parameters associated with the update.

          • type — (String)

            The keys associated with an update request.

            Possible values include:
            • "Version"
            • "PlatformVersion"
            • "EndpointPrivateAccess"
            • "EndpointPublicAccess"
            • "ClusterLogging"
          • value — (String)

            The value of the keys submitted as part of an update request.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the update was created.

        • errors — (Array<map>)

          Any errors associated with a Failed update.

          • errorCode — (String)

            A brief description of the error.

            • SubnetNotFound: One of the subnets associated with the cluster could not be found.

            • SecurityGroupNotFound: One of the security groups associated with the cluster could not be found.

            • EniLimitReached: You have reached the elastic network interface limit for your account.

            • IpNotAvailable: A subnet associated with the cluster does not have any free IP addresses.

            • AccessDenied: You do not have permissions to perform the specified operation.

            • OperationNotPermitted: The service role associated with the cluster does not have the required access permissions for Amazon EKS.

            • VpcIdNotFound: The VPC associated with the cluster could not be found.

            Possible values include:
            • "SubnetNotFound"
            • "SecurityGroupNotFound"
            • "EniLimitReached"
            • "IpNotAvailable"
            • "AccessDenied"
            • "OperationNotPermitted"
            • "VpcIdNotFound"
            • "Unknown"
          • errorMessage — (String)

            A more complete description of the error.

          • resourceIds — (Array<String>)

            An optional field that contains the resource IDs associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given EKS resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the clusterActive state

var params = {
  name: 'STRING_VALUE' /* required */
};
eks.waitFor('clusterActive', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

Waiter Resource Details

eks.waitFor('clusterActive', params = {}, [callback]) ⇒ AWS.Request

Waits for the clusterActive state by periodically calling the underlying EKS.describeCluster() operation every 30 seconds (at most 40 times).

Examples:

Waiting for the clusterActive state

var params = {
  name: 'STRING_VALUE' /* required */
};
eks.waitFor('clusterActive', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • name — (String)

      The name of the cluster to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • cluster — (map)

        The full description of your specified cluster.

        • name — (String)

          The name of the cluster.

        • arn — (String)

          The Amazon Resource Name (ARN) of the cluster.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the cluster was created.

        • version — (String)

          The Kubernetes server version for the cluster.

        • endpoint — (String)

          The endpoint for your Kubernetes API server.

        • roleArn — (String)

          The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

        • resourcesVpcConfig — (map)

          The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide.

          • subnetIds — (Array<String>)

            The subnets associated with your cluster.

          • securityGroupIds — (Array<String>)

            The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

          • vpcId — (String)

            The VPC associated with your cluster.

          • endpointPublicAccess — (Boolean)

            This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can only receive requests that originate from within the cluster VPC.

          • endpointPrivateAccess — (Boolean)

            This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC will use the private VPC endpoint instead of traversing the internet.

        • logging — (map)

          The logging configuration for your cluster.

          • clusterLogging — (Array<map>)

            The cluster control plane logging configuration for your cluster.

            • types — (Array<String>)

              The available cluster control plane log types.

            • enabled — (Boolean)

              If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

        • status — (String)

          The current status of the cluster.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
          • "FAILED"
        • certificateAuthority — (map)

          The certificate-authority-data for your cluster.

          • data — (String)

            The base64 encoded certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.

        • clientRequestToken — (String)

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

        • platformVersion — (String)

          The platform version of your Amazon EKS cluster. For more information, see Platform Versions in the Amazon EKS User Guide .

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

eks.waitFor('clusterDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the clusterDeleted state by periodically calling the underlying EKS.describeCluster() operation every 30 seconds (at most 40 times).

Examples:

Waiting for the clusterDeleted state

var params = {
  name: 'STRING_VALUE' /* required */
};
eks.waitFor('clusterDeleted', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • name — (String)

      The name of the cluster to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • cluster — (map)

        The full description of your specified cluster.

        • name — (String)

          The name of the cluster.

        • arn — (String)

          The Amazon Resource Name (ARN) of the cluster.

        • createdAt — (Date)

          The Unix epoch timestamp in seconds for when the cluster was created.

        • version — (String)

          The Kubernetes server version for the cluster.

        • endpoint — (String)

          The endpoint for your Kubernetes API server.

        • roleArn — (String)

          The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

        • resourcesVpcConfig — (map)

          The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide.

          • subnetIds — (Array<String>)

            The subnets associated with your cluster.

          • securityGroupIds — (Array<String>)

            The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

          • vpcId — (String)

            The VPC associated with your cluster.

          • endpointPublicAccess — (Boolean)

            This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can only receive requests that originate from within the cluster VPC.

          • endpointPrivateAccess — (Boolean)

            This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC will use the private VPC endpoint instead of traversing the internet.

        • logging — (map)

          The logging configuration for your cluster.

          • clusterLogging — (Array<map>)

            The cluster control plane logging configuration for your cluster.

            • types — (Array<String>)

              The available cluster control plane log types.

            • enabled — (Boolean)

              If a log type is enabled, then that log type exports its control plane logs to CloudWatch Logs. If a log type is not enabled, then that log type does not export its control plane logs. Each individual log type can be enabled or disabled independently.

        • status — (String)

          The current status of the cluster.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
          • "FAILED"
        • certificateAuthority — (map)

          The certificate-authority-data for your cluster.

          • data — (String)

            The base64 encoded certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.

        • clientRequestToken — (String)

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

        • platformVersion — (String)

          The platform version of your Amazon EKS cluster. For more information, see Platform Versions in the Amazon EKS User Guide .

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also: