Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
| import boto3 | |
| import pandas | |
| AWS_ACCESS_KEY_ID = 'YOUR_AWS_ACCESS_KEY_ID' | |
| AWS_SECRET_ACCESS_KEY = 'YOUR_AWS_SECRET_ACCESS_KEY' | |
| # connect to s3 | |
| s3 = boto3.client( | |
| 's3', | |
| aws_access_key_id=AWS_ACCESS_KEY_ID, |