2019/12/03 - Amazon Elastic Kubernetes Service - 4 new api methods
Changes Update eks client to latest version
Creates an AWS Fargate profile for your Amazon EKS cluster. You must have at least one Fargate profile in a cluster to be able to schedule pods on Fargate infrastructure.
The Fargate profile allows an administrator to declare which pods run on Fargate infrastructure and specify which pods run on which Fargate profile. This declaration is done through the profile’s selectors. Each profile can have up to five selectors that contain a namespace and labels. A namespace is required for every selector. The label field consists of multiple optional key-value pairs. Pods that match the selectors are scheduled on Fargate infrastructure. If a to-be-scheduled pod matches any of the selectors in the Fargate profile, then that pod is scheduled on Fargate infrastructure.
When you create a Fargate profile, you must specify a pod execution role to use with the pods that are scheduled with the profile. This role is added to the cluster's Kubernetes Role Based Access Control (RBAC) for authorization so that the kubelet that is running on the Fargate infrastructure can register with your Amazon EKS cluster. This role is what allows Fargate infrastructure to appear in your cluster as nodes. The pod execution role also provides IAM permissions to the Fargate infrastructure to allow read access to Amazon ECR image repositories. For more information, see Pod Execution Role in the Amazon EKS User Guide.
Fargate profiles are immutable. However, you can create a new updated profile to replace an existing profile and then delete the original after the updated profile has finished creating.
If any Fargate profiles in a cluster are in the DELETING status, you must wait for that Fargate profile to finish deleting before you can create any other profiles in that cluster.
For more information, see AWS Fargate Profile in the Amazon EKS User Guide.
See also: AWS API Documentation
Request Syntax
client.create_fargate_profile( fargateProfileName='string', clusterName='string', podExecutionRoleArn='string', subnets=[ 'string', ], selectors=[ { 'namespace': 'string', 'labels': { 'string': 'string' } }, ], clientRequestToken='string', tags={ 'string': 'string' } )
string
[REQUIRED]
The name of the Fargate profile.
string
[REQUIRED]
The name of the Amazon EKS cluster to apply the Fargate profile to.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile. The pod execution role allows Fargate infrastructure to register with your cluster as a node, and it provides read access to Amazon ECR image repositories. For more information, see Pod Execution Role in the Amazon EKS User Guide.
list
The IDs of subnets to launch Fargate pods into. At this time, Fargate pods are not assigned public IP addresses, so only private subnets (with no direct route to an Internet Gateway) are accepted for this parameter.
(string) --
list
The selectors to match for pods to use this Fargate profile. Each selector must have an associated namespace. Optionally, you can also specify labels for a namespace. You may specify up to five selectors in a Fargate profile.
(dict) --
An object representing an AWS Fargate profile selector.
namespace (string) --
The Kubernetes namespace that the selector should match.
labels (dict) --
The Kubernetes labels that the selector should match. A pod must contain all of the labels that are specified in the selector for it to be considered a match.
(string) --
(string) --
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
The metadata to apply to the Fargate profile to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Fargate profile tags do not propagate to any other resources associated with the Fargate profile, such as the pods that are scheduled with it.
(string) --
(string) --
dict
Response Syntax
{ 'fargateProfile': { 'fargateProfileName': 'string', 'fargateProfileArn': 'string', 'clusterName': 'string', 'createdAt': datetime(2015, 1, 1), 'podExecutionRoleArn': 'string', 'subnets': [ 'string', ], 'selectors': [ { 'namespace': 'string', 'labels': { 'string': 'string' } }, ], 'status': 'CREATING'|'ACTIVE'|'DELETING'|'CREATE_FAILED'|'DELETE_FAILED', 'tags': { 'string': 'string' } } }
Response Structure
(dict) --
fargateProfile (dict) --
The full description of your new Fargate profile.
fargateProfileName (string) --
The name of the Fargate profile.
fargateProfileArn (string) --
The full Amazon Resource Name (ARN) of the Fargate profile.
clusterName (string) --
The name of the Amazon EKS cluster that the Fargate profile belongs to.
createdAt (datetime) --
The Unix epoch timestamp in seconds for when the Fargate profile was created.
podExecutionRoleArn (string) --
The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile. For more information, see Pod Execution Role in the Amazon EKS User Guide.
subnets (list) --
The IDs of subnets to launch Fargate pods into.
(string) --
selectors (list) --
The selectors to match for pods to use this Fargate profile.
(dict) --
An object representing an AWS Fargate profile selector.
namespace (string) --
The Kubernetes namespace that the selector should match.
labels (dict) --
The Kubernetes labels that the selector should match. A pod must contain all of the labels that are specified in the selector for it to be considered a match.
(string) --
(string) --
status (string) --
The current status of the Fargate profile.
tags (dict) --
The metadata applied to the Fargate profile to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Fargate profile tags do not propagate to any other resources associated with the Fargate profile, such as the pods that are scheduled with it.
(string) --
(string) --
Returns descriptive information about an AWS Fargate profile.
See also: AWS API Documentation
Request Syntax
client.describe_fargate_profile( clusterName='string', fargateProfileName='string' )
string
[REQUIRED]
The name of the Amazon EKS cluster associated with the Fargate profile.
string
[REQUIRED]
The name of the Fargate profile to describe.
dict
Response Syntax
{ 'fargateProfile': { 'fargateProfileName': 'string', 'fargateProfileArn': 'string', 'clusterName': 'string', 'createdAt': datetime(2015, 1, 1), 'podExecutionRoleArn': 'string', 'subnets': [ 'string', ], 'selectors': [ { 'namespace': 'string', 'labels': { 'string': 'string' } }, ], 'status': 'CREATING'|'ACTIVE'|'DELETING'|'CREATE_FAILED'|'DELETE_FAILED', 'tags': { 'string': 'string' } } }
Response Structure
(dict) --
fargateProfile (dict) --
The full description of your Fargate profile.
fargateProfileName (string) --
The name of the Fargate profile.
fargateProfileArn (string) --
The full Amazon Resource Name (ARN) of the Fargate profile.
clusterName (string) --
The name of the Amazon EKS cluster that the Fargate profile belongs to.
createdAt (datetime) --
The Unix epoch timestamp in seconds for when the Fargate profile was created.
podExecutionRoleArn (string) --
The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile. For more information, see Pod Execution Role in the Amazon EKS User Guide.
subnets (list) --
The IDs of subnets to launch Fargate pods into.
(string) --
selectors (list) --
The selectors to match for pods to use this Fargate profile.
(dict) --
An object representing an AWS Fargate profile selector.
namespace (string) --
The Kubernetes namespace that the selector should match.
labels (dict) --
The Kubernetes labels that the selector should match. A pod must contain all of the labels that are specified in the selector for it to be considered a match.
(string) --
(string) --
status (string) --
The current status of the Fargate profile.
tags (dict) --
The metadata applied to the Fargate profile to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Fargate profile tags do not propagate to any other resources associated with the Fargate profile, such as the pods that are scheduled with it.
(string) --
(string) --
Lists the AWS Fargate profiles associated with the specified cluster in your AWS account in the specified Region.
See also: AWS API Documentation
Request Syntax
client.list_fargate_profiles( clusterName='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The name of the Amazon EKS cluster that you would like to listFargate profiles in.
integer
The maximum number of Fargate profile results returned by ListFargateProfiles in paginated output. When you use this parameter, ListFargateProfiles returns only maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListFargateProfiles request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListFargateProfiles returns up to 100 results and a nextToken value if applicable.
string
The nextToken value returned from a previous paginated ListFargateProfiles 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.
dict
Response Syntax
{ 'fargateProfileNames': [ 'string', ], 'nextToken': 'string' }
Response Structure
(dict) --
fargateProfileNames (list) --
A list of all of the Fargate profiles associated with the specified cluster.
(string) --
nextToken (string) --
The nextToken value to include in a future ListFargateProfiles request. When the results of a ListFargateProfiles request exceed maxResults, you can use this value to retrieve the next page of results. This value is null when there are no more results to return.
Deletes an AWS Fargate profile.
When you delete a Fargate profile, any pods that were scheduled onto Fargate infrastructure with the profile are deleted. If those pods match another Fargate profile, then they are scheduled on Fargate infrastructure with that profile. If they no longer match any Fargate profiles, then they are not scheduled on Fargate infrastructure.
Only one Fargate profile in a cluster can be in the DELETING status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.
See also: AWS API Documentation
Request Syntax
client.delete_fargate_profile( clusterName='string', fargateProfileName='string' )
string
[REQUIRED]
The name of the Amazon EKS cluster associated with the Fargate profile to delete.
string
[REQUIRED]
The name of the Fargate profile to delete.
dict
Response Syntax
{ 'fargateProfile': { 'fargateProfileName': 'string', 'fargateProfileArn': 'string', 'clusterName': 'string', 'createdAt': datetime(2015, 1, 1), 'podExecutionRoleArn': 'string', 'subnets': [ 'string', ], 'selectors': [ { 'namespace': 'string', 'labels': { 'string': 'string' } }, ], 'status': 'CREATING'|'ACTIVE'|'DELETING'|'CREATE_FAILED'|'DELETE_FAILED', 'tags': { 'string': 'string' } } }
Response Structure
(dict) --
fargateProfile (dict) --
The deleted Fargate profile.
fargateProfileName (string) --
The name of the Fargate profile.
fargateProfileArn (string) --
The full Amazon Resource Name (ARN) of the Fargate profile.
clusterName (string) --
The name of the Amazon EKS cluster that the Fargate profile belongs to.
createdAt (datetime) --
The Unix epoch timestamp in seconds for when the Fargate profile was created.
podExecutionRoleArn (string) --
The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile. For more information, see Pod Execution Role in the Amazon EKS User Guide.
subnets (list) --
The IDs of subnets to launch Fargate pods into.
(string) --
selectors (list) --
The selectors to match for pods to use this Fargate profile.
(dict) --
An object representing an AWS Fargate profile selector.
namespace (string) --
The Kubernetes namespace that the selector should match.
labels (dict) --
The Kubernetes labels that the selector should match. A pod must contain all of the labels that are specified in the selector for it to be considered a match.
(string) --
(string) --
status (string) --
The current status of the Fargate profile.
tags (dict) --
The metadata applied to the Fargate profile to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Fargate profile tags do not propagate to any other resources associated with the Fargate profile, such as the pods that are scheduled with it.
(string) --
(string) --