airflow.providers.amazon.aws.hooks.eks
¶
Interact with Amazon EKS, using the boto3 library.
Module Contents¶
Classes¶
Contains the possible State values of an EKS Cluster. |
|
Contains the possible State values of an AWS Fargate profile. |
|
Contains the possible State values of an EKS Managed Nodegroup. |
|
Interact with Amazon Elastic Kubernetes Service (EKS). |
Attributes¶
- airflow.providers.amazon.aws.hooks.eks.AUTHENTICATION_API_VERSION = 'client.authentication.k8s.io/v1alpha1'[source]¶
- class airflow.providers.amazon.aws.hooks.eks.ClusterStates[source]¶
Bases:
enum.Enum
Contains the possible State values of an EKS Cluster.
- class airflow.providers.amazon.aws.hooks.eks.FargateProfileStates[source]¶
Bases:
enum.Enum
Contains the possible State values of an AWS Fargate profile.
- class airflow.providers.amazon.aws.hooks.eks.NodegroupStates[source]¶
Bases:
enum.Enum
Contains the possible State values of an EKS Managed Nodegroup.
- class airflow.providers.amazon.aws.hooks.eks.EksHook(*args, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook
Interact with Amazon Elastic Kubernetes Service (EKS).
Provide thin wrapper around
boto3.client("eks")
.Additional arguments (such as
aws_conn_id
) may be specified and are passed down to the underlying AwsBaseHook.- create_cluster(name, roleArn, resourcesVpcConfig, **kwargs)[source]¶
Create an Amazon EKS control plane.
See also
- Parameters
name (str) – The unique name to give to your Amazon EKS Cluster.
roleArn (str) – 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 (dict) – The VPC configuration used by the cluster control plane.
- Returns
Returns descriptive information about the created EKS Cluster.
- Return type
- create_nodegroup(clusterName, nodegroupName, subnets, nodeRole, *, tags=None, **kwargs)[source]¶
Create an Amazon EKS managed node group for an Amazon EKS Cluster.
See also
- Parameters
clusterName (str) – The name of the Amazon EKS cluster to create the EKS Managed Nodegroup in.
nodegroupName (str) – The unique name to give your managed nodegroup.
subnets (list[str]) – The subnets to use for the Auto Scaling group that is created for your nodegroup.
nodeRole (str | None) – The Amazon Resource Name (ARN) of the IAM role to associate with your nodegroup.
tags (dict | None) – Optional tags to apply to your nodegroup.
- Returns
Returns descriptive information about the created EKS Managed Nodegroup.
- Return type
- create_fargate_profile(clusterName, fargateProfileName, podExecutionRoleArn, selectors, **kwargs)[source]¶
Create an AWS Fargate profile for an Amazon EKS cluster.
See also
- Parameters
clusterName (str) – The name of the Amazon EKS cluster to apply the Fargate profile to.
fargateProfileName (str | None) – The name of the Fargate profile.
podExecutionRoleArn (str | None) – The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile.
selectors (list) – The selectors to match for pods to use this Fargate profile.
- Returns
Returns descriptive information about the created Fargate profile.
- Return type
- delete_nodegroup(clusterName, nodegroupName)[source]¶
Delete an Amazon EKS managed node group from a specified cluster.
See also
- delete_fargate_profile(clusterName, fargateProfileName)[source]¶
Delete an AWS Fargate profile from a specified Amazon EKS cluster.
See also
- describe_cluster(name, verbose=False)[source]¶
Return descriptive information about an Amazon EKS Cluster.
See also
- describe_nodegroup(clusterName, nodegroupName, verbose=False)[source]¶
Return descriptive information about an Amazon EKS managed node group.
See also
- Parameters
- Returns
Returns descriptive information about a specific EKS Nodegroup.
- Return type
- describe_fargate_profile(clusterName, fargateProfileName, verbose=False)[source]¶
Return descriptive information about an AWS Fargate profile.
- Parameters
- Returns
Returns descriptive information about an AWS Fargate profile.
- Return type
- get_cluster_state(clusterName)[source]¶
Return the current status of a given Amazon EKS Cluster.
See also
- Parameters
clusterName (str) – The name of the cluster to check.
- Returns
Returns the current status of a given Amazon EKS Cluster.
- Return type
- get_fargate_profile_state(clusterName, fargateProfileName)[source]¶
Return the current status of a given AWS Fargate profile.
- Parameters
- Returns
Returns the current status of a given AWS Fargate profile.
- Return type
- get_nodegroup_state(clusterName, nodegroupName)[source]¶
Return the current status of a given Amazon EKS managed node group.
See also
- Parameters
- Returns
Returns the current status of a given Amazon EKS Nodegroup.
- Return type
- list_nodegroups(clusterName, verbose=False)[source]¶
List all Amazon EKS managed node groups associated with the specified cluster.
See also
- list_fargate_profiles(clusterName, verbose=False)[source]¶
List all AWS Fargate profiles associated with the specified cluster.
See also