Skip to content

Instantly share code, notes, and snippets.

@peterbe
Created November 7, 2019 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterbe/805444532fe619af9cdb774bec250a2d to your computer and use it in GitHub Desktop.
Save peterbe/805444532fe619af9cdb774bec250a2d to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
export KUBECONFIG=~/.kube/oregon.config # Was this needed?!
cd /Users/peterbe/dev/MOZILLA/MDN/infra/apps/mdn/mdn-aws/k8s
source regions/oregon/prod.sh # change to stage.sh for Stage
# Can't use aliases!
name=`kubectl -n mdn-prod get pods | grep 'web-' | head -n 1 | awk '{ print $1 }'`
echo "Going to bash into ${name}"
kubectl -n mdn-prod exec -it "$name" bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment