Created
September 29, 2024 07:52
-
-
Save zed-eiq/714233e8b92102d11d603c9449a57b37 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ### Small script to get AWS EC2 instance ID from 'kubectl describe node' | |
| alias k=kubectl | |
| while getopts ":n:" opt; do | |
| case ${opt} in | |
| n) NODE=${OPTARG} | |
| ;; | |
| esac | |
| done | |
| k describe no "${NODE}" | grep ProviderID | cut -d'/' -f5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment