Skip to content

Instantly share code, notes, and snippets.

@omerh
Last active July 14, 2020 08:37
Show Gist options
  • Save omerh/38d2c6adadef4c1c0d12d122fb3e9ca4 to your computer and use it in GitHub Desktop.
Save omerh/38d2c6adadef4c1c0d12d122fb3e9ca4 to your computer and use it in GitHub Desktop.
#!/bin/bash
aws_key=$(cat ~/.aws/credentials | grep -A 2 default | grep key_id | awk '{print $3}')
aws_secret=$(cat ~/.aws/credentials | grep -A 2 default | grep secret | awk '{print $3}')
kubectl create secret generic aws_credentials \
--from-literal key=$aws_key \
--from-literal secret=$aws_secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment