Running KubernetesPodOperator in different AWS accounts
I got a mail from Apurav Sharma who was looking to find out about how MWAA supported using the KubernetesPodOperator to kick off tasks in Amazon EKS Containers in any AWS account. This post reveals how you can do that, using a very simple task that displays the AWS account number.
Pre-requisites
- You will need admin access to two AWS Accounts, with local AWS Cli tools setup and
- eksctl version 0.124.0
- kubectl version at least v1.24.1
- A MWAA environment up and running (I am using MWAA with Apache Airflow 2.2.2)
As I have two different AWS accounts, I am using profiles in my local .aws/credentials file to enable me to ensure I access the specific AWS account. Any references to “–profile personal” is referring to the second AWS account, and where it is omitted, the first AWS account.
Creating a new Amazon EKS cluster
I used the same steps that were in my original blog post, Working with Amazon EKS…
[gs-fb-comments]