Skip to content

Instantly share code, notes, and snippets.

@starkfell
Last active December 6, 2018 12:02
Show Gist options
  • Select an option

  • Save starkfell/ba0cb2fb421e0ec52cc32137e8a998f4 to your computer and use it in GitHub Desktop.

Select an option

Save starkfell/ba0cb2fb421e0ec52cc32137e8a998f4 to your computer and use it in GitHub Desktop.
quick-ref-commands.sh
# Generate a password-less SSH Key.
ssh-keygen -t rsa -b 2048 -C "ssh-key-name-goes-here" -f ~/.ssh/ssh-key-name-goes-here -N ''
# Add a key for logging in via SSH or cloning Git via SSH.
eval $(ssh-agent -s) ; ssh-add ~/.ssh/
# Retrieve contents of Docker Registry or Azure Container Registry secret in Kubernetes Cluster.
kubectl get secret regcred --output="jsonpath={.data.\.dockerconfigjson}" | base64 --decode
# Retrieving all of the Agent Pools that are not 'master'.
AGENT_POOL_NAMES=$(az vm list --resource-group RG_NAME | jq '.[].tags | select(.poolName != "master").poolName' | tr -d '"' | uniq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment