EKS / Client / update_cluster_config
update_cluster_config#
- EKS.Client.update_cluster_config(**kwargs)#
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
DescribeUpdate
”/>.You can 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 aren’t 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 CloudWatch Pricing.
You can also 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 choose different subnets and security groups for the cluster. You must specify at least two subnets that are in different Availability Zones. You can’t change which VPC the subnets are from, the subnets must be in the same VPC as the subnets that the cluster was created with. For more information about the VPC requirements, see https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html in the Amazon EKS User Guide .
You can also use this API operation to enable or disable ARC zonal shift. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.
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 (eitherFailed
orSuccessful
), the cluster status moves toActive
.See also: AWS API Documentation
Request Syntax
response = client.update_cluster_config( name='string', resourcesVpcConfig={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ], 'endpointPublicAccess': True|False, 'endpointPrivateAccess': True|False, 'publicAccessCidrs': [ 'string', ] }, logging={ 'clusterLogging': [ { 'types': [ 'api'|'audit'|'authenticator'|'controllerManager'|'scheduler', ], 'enabled': True|False }, ] }, clientRequestToken='string', accessConfig={ 'authenticationMode': 'API'|'API_AND_CONFIG_MAP'|'CONFIG_MAP' }, upgradePolicy={ 'supportType': 'STANDARD'|'EXTENDED' }, zonalShiftConfig={ 'enabled': True|False } )
- Parameters:
name (string) –
[REQUIRED]
The name of the Amazon EKS cluster to update.
resourcesVpcConfig (dict) –
An object representing the VPC configuration to use for an Amazon EKS cluster.
subnetIds (list) –
Specify subnets for your Amazon EKS nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your nodes and the Kubernetes control plane.
(string) –
securityGroupIds (list) –
Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use that allow communication between your nodes and the Kubernetes control plane. If you don’t specify any security groups, then familiarize yourself with the difference between Amazon EKS defaults for clusters deployed with Kubernetes. For more information, see Amazon EKS security group considerations in the Amazon EKS User Guide .
(string) –
endpointPublicAccess (boolean) –
Set this value to
false
to disable public access to 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 istrue
, 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 use the private VPC endpoint. The default value for this parameter isfalse
, which disables private access for your Kubernetes API server. If you disable private access and you have nodes or Fargate pods in the cluster, then ensure thatpublicAccessCidrs
includes the necessary CIDR blocks for communication with the nodes or Fargate pods. For more information, see Amazon EKS cluster endpoint access control in the Amazon EKS User Guide .publicAccessCidrs (list) –
The CIDR blocks that are allowed access to your cluster’s public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is
0.0.0.0/0
. If you’ve disabled private endpoint access, make sure that you specify the necessary CIDR blocks for every node and FargatePod
in the cluster. For more information, see Amazon EKS cluster endpoint access control in the Amazon EKS User Guide .(string) –
logging (dict) –
Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren’t 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 CloudWatch Pricing.
clusterLogging (list) –
The cluster control plane logging configuration for your cluster.
(dict) –
An object representing the enabled or disabled Kubernetes control plane logs for your cluster.
types (list) –
The available cluster control plane log types.
(string) –
enabled (boolean) –
If a log type is enabled, that log type exports its control plane logs to CloudWatch Logs. If a log type isn’t enabled, that log type doesn’t export its control plane logs. Each individual log type can be enabled or disabled independently.
clientRequestToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
accessConfig (dict) –
The access configuration for the cluster.
authenticationMode (string) –
The desired authentication mode for the cluster.
upgradePolicy (dict) –
You can enable or disable extended support for clusters currently on standard support. You cannot disable extended support once it starts. You must enable extended support before your cluster exits standard support.
supportType (string) –
If the cluster is set to
EXTENDED
, it will enter extended support at the end of standard support. If the cluster is set toSTANDARD
, it will be automatically upgraded at the end of standard support.Learn more about EKS Extended Support in the EKS User Guide.
zonalShiftConfig (dict) –
Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.
Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.
You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by enabling zonal autoshift. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User Guide .
enabled (boolean) –
If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.
- Return type:
dict
- Returns:
Response Syntax
{ 'update': { 'id': 'string', 'status': 'InProgress'|'Failed'|'Cancelled'|'Successful', 'type': 'VersionUpdate'|'EndpointAccessUpdate'|'LoggingUpdate'|'ConfigUpdate'|'AssociateIdentityProviderConfig'|'DisassociateIdentityProviderConfig'|'AssociateEncryptionConfig'|'AddonUpdate'|'VpcConfigUpdate'|'AccessConfigUpdate'|'UpgradePolicyUpdate'|'ZonalShiftConfigUpdate', 'params': [ { 'type': 'Version'|'PlatformVersion'|'EndpointPrivateAccess'|'EndpointPublicAccess'|'ClusterLogging'|'DesiredSize'|'LabelsToAdd'|'LabelsToRemove'|'TaintsToAdd'|'TaintsToRemove'|'MaxSize'|'MinSize'|'ReleaseVersion'|'PublicAccessCidrs'|'LaunchTemplateName'|'LaunchTemplateVersion'|'IdentityProviderConfig'|'EncryptionConfig'|'AddonVersion'|'ServiceAccountRoleArn'|'ResolveConflicts'|'MaxUnavailable'|'MaxUnavailablePercentage'|'ConfigurationValues'|'SecurityGroups'|'Subnets'|'AuthenticationMode'|'PodIdentityAssociations'|'UpgradePolicy'|'ZonalShiftConfig', 'value': 'string' }, ], 'createdAt': datetime(2015, 1, 1), 'errors': [ { 'errorCode': 'SubnetNotFound'|'SecurityGroupNotFound'|'EniLimitReached'|'IpNotAvailable'|'AccessDenied'|'OperationNotPermitted'|'VpcIdNotFound'|'Unknown'|'NodeCreationFailure'|'PodEvictionFailure'|'InsufficientFreeAddresses'|'ClusterUnreachable'|'InsufficientNumberOfReplicas'|'ConfigurationConflict'|'AdmissionRequestDenied'|'UnsupportedAddonModification'|'K8sResourceNotFound', 'errorMessage': 'string', 'resourceIds': [ 'string', ] }, ] } }
Response Structure
(dict) –
update (dict) –
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.
type (string) –
The type of the update.
params (list) –
A key-value map that contains the parameters associated with the update.
(dict) –
An object representing the details of an update request.
type (string) –
The keys associated with an update request.
value (string) –
The value of the keys submitted as part of an update request.
createdAt (datetime) –
The Unix epoch timestamp at object creation.
errors (list) –
Any errors associated with a
Failed
update.(dict) –
An object representing an error when an asynchronous operation fails.
errorCode (string) –
A brief description of the error.
SubnetNotFound: We couldn’t find one of the subnets associated with the cluster.
SecurityGroupNotFound: We couldn’t find one of the security groups associated with the cluster.
EniLimitReached: You have reached the elastic network interface limit for your account.
IpNotAvailable: A subnet associated with the cluster doesn’t have any available IP addresses.
AccessDenied: You don’t have permissions to perform the specified operation.
OperationNotPermitted: The service role associated with the cluster doesn’t have the required access permissions for Amazon EKS.
VpcIdNotFound: We couldn’t find the VPC associated with the cluster.
errorMessage (string) –
A more complete description of the error.
resourceIds (list) –
An optional field that contains the resource IDs associated with the error.
(string) –
Exceptions