EksCreateClusterOperator

Amazon

Creates an Amazon EKS Cluster control plane.

View on GitHub

Last Updated: Apr. 14, 2023

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

cluster_nameThe unique name to give to your Amazon EKS Cluster. (templated)
cluster_role_arnThe 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. (templated)
resources_vpc_configThe VPC configuration used by the cluster control plane. (templated)
computeThe type of compute architecture to generate along with the cluster. (templated) Defaults to ‘nodegroup’ to generate an EKS Managed Nodegroup.
create_cluster_kwargsOptional parameters to pass to the CreateCluster API (templated)
wait_for_completionIf True, waits for operator to complete. (default: False) (templated)
aws_conn_idThe Airflow connection used for AWS credentials. (templated) If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then the default boto3 configuration would be used (and must be maintained on each worker node).
regionWhich AWS region the connection should use. (templated) If this is None or empty then the default boto3 behaviour is used.

Documentation

Creates an Amazon EKS Cluster control plane.

Optionally, can also create the supporting compute architecture:

  • If argument ‘compute’ is provided with a value of ‘fargate’, will also attempt to create an AWS

    Fargate profile for the cluster. See EksCreateFargateProfileOperator documentation for requirements.

See also

For more information on how to use this operator, take a look at the guide: Create an Amazon EKS cluster

param cluster_name

The unique name to give to your Amazon EKS Cluster. (templated)

param cluster_role_arn

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. (templated)

param resources_vpc_config

The VPC configuration used by the cluster control plane. (templated)

param compute

The type of compute architecture to generate along with the cluster. (templated) Defaults to ‘nodegroup’ to generate an EKS Managed Nodegroup.

param create_cluster_kwargs

Optional parameters to pass to the CreateCluster API (templated)

param wait_for_completion

If True, waits for operator to complete. (default: False) (templated)

param aws_conn_id

The Airflow connection used for AWS credentials. (templated) If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then the default boto3 configuration would be used (and must be maintained on each worker node).

param region

Which AWS region the connection should use. (templated) If this is None or empty then the default boto3 behaviour is used.

If compute is assigned the value of ‘nodegroup’:

param nodegroup_name

REQUIRED The unique name to give your Amazon EKS managed node group. (templated)

param nodegroup_role_arn

REQUIRED The Amazon Resource Name (ARN) of the IAM role to associate with the Amazon EKS managed node group. (templated)

param create_nodegroup_kwargs

Optional parameters to pass to the CreateNodegroup API (templated)

If compute is assigned the value of ‘fargate’:

param fargate_profile_name

REQUIRED The unique name to give your AWS Fargate profile. (templated)

param fargate_pod_execution_role_arn

REQUIRED The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the AWS Fargate profile. (templated)

param fargate_selectors

The selectors to match for pods to use this AWS Fargate profile. (templated)

param create_fargate_profile_kwargs

Optional parameters to pass to the CreateFargateProfile API (templated)

Was this page helpful?