Last active
February 8, 2023 07:12
-
-
Save aramse/6eb4a5b11269bb19d9ad35bb21ace6f6 to your computer and use it in GitHub Desktop.
Useful kubectl commands
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
# Run a container with the AWS CLI on a specific node: | |
kubectl run -it debug --image amazon/aws-cli --command bash --overrides='{ "apiVersion": "apps/v1beta1", "spec": { "template": { "spec": { "nodeSelector": { "kubernetes.io/hostname": "<node-name>" } } } } }' | |
# Configure KIAM role: | |
kubectl run -it debug --image amazon/aws-cli --overrides='{"spec": {"template": {"metadata": {"annotations": {"iam.amazonaws.com/role": "my-cool-role"}}}}}' -- bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I came across this from Google. Here's a quick oneliner for testing if your service account (& IAM role) for your IRSA setup works