Metadata-Version: 2.1
Name: quick_eks_cross_az
Version: 0.9.1
Summary: Quick EKS corss-AZ log
Author-email: Asaf Amrmi <asaf.amrami@gmail.com>
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: PyYAML~=6.0.1
Requires-Dist: kubernetes~=29.0.0
Requires-Dist: boto3~=1.34.43
Requires-Dist: yaspin~=3.0.1
Requires-Dist: wakepy~=0.7.2
Project-URL: Bug Tracker, https://github.com/asafamr/quick-eks-cross-az/issues
Project-URL: Homepage, https://github.com/asafamr/quick-eks-cross-az

# Quick EKS cross az

This project is based on [existing AWS open solution](https://aws.amazon.com/blogs/containers/getting-visibility-into-your-amazon-eks-cross-az-pod-to-pod-network-bytes/).
It simplifies operations by using your current AWS role directly from your shell session, and without using any iam:* permission...


## Features

* **Runs With Your Current AWS Credentials:** Uses the AWS credentials and settings you already have configured in your shell session. No need to configure special credentials just for the demo.
* **Works Without Administrator Privileges:** No need for IAM modification permissions - it's designed to work seamlessly with PowerUser access.  
* **Reuses Your EKS Authentication:** Uses the active Kubernetes context in your shell to retrieve pod and node metadata.
* **Simple Exectuion:** Offers one-line execution with pipx or docker for all orchestration including cleanup.


## Technical Details
Similar to the original solution, this project utilizes CloudFormation to provision flow logs and S3 buckets. However, it orchestrates everything using a script:

* Flow logs are temporarily enabled for the EKS VPC, and necessary S3 buckets are created via CloudFormation.
* Pod metadata, including the `app` label and node IP, is gathered.
* After a configurable timeframe, flow logs are aggregated within Athena.
* The results are downloaded as a CSV file.
* Finally, the script cleans up any infrastructure changes made.


## Getting Started


### Prerequisites
* Python version 3.6 or later
* Kubernetes Cluster API access in current shell
* An active AWS role in your current shell that has permissions to:
    * Create flow logs
    * Create S3 buckets
    * Run Athena queries

#### Using Pipx 

Easiest way to run the script is with [pipx](https://github.com/pypa/pipx). Pipx lets you run Python packages quickly in isolation:

```bash
python3 -m pip install --user pipx
python3 -m pipx run quick-eks-cross-az
```


#### Using Docker
[TODO]
