This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get pod node | |
kubectl describe pod <pod name> | grep Node | |
# get node instance id | |
AWS_PROFILE=<profile> aws ec2 describe-instances --filters Name=private-dns-name,Values=<node name> | jq -r '.Reservations[0].Instances[0].InstanceId' | |
# ssm to instance | |
AWS_PROFILE=<profile> aws ssm start-session --target <instance id> | |
# (optional) switch to bash |