Skip to content

Instantly share code, notes, and snippets.

@jdufresne-ebsco
Last active November 6, 2018 18:58
Show Gist options
  • Save jdufresne-ebsco/b594755f012aa8dec0044c69c8d14fbd to your computer and use it in GitHub Desktop.
Save jdufresne-ebsco/b594755f012aa8dec0044c69c8d14fbd to your computer and use it in GitHub Desktop.
Vagrant - kubectl
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "williamyeh/ubuntu-trusty64-docker"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y apt-transport-https python-pip python-dev build-essential libxslt-dev libxml2-dev libffi-dev libssl-dev awscli
curl -o ~/kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/kubectl
chmod +x ~/kubectl
cp ~/kubectl /bin/kubectl
curl -o ~/aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/aws-iam-authenticator
chmod +x ~/aws-iam-authenticator
cp ~/aws-iam-authenticator /bin/aws-iam-authenticator
pip install --upgrade setuptools
pip install aws-adfs --ignore-installed six
pip install ipaddress enum34
#After image is up
#sudo mkdir ~/.kube
#sudo cp /vagrant/config ~/.kube/config
#aws-adfs login --profile=eis-deliverydevqa --region=us-east-1 --adfs-host=fsx.ebsco.com
#export AWS_PROFILE=eis-deliverydevqa
#kubectl version
####OTHER COMMANDs
# reset login
#aws-adfs reset --profile=eis-deliverydevqa
#unset AWS_PROFILE
#kubectl COMMANDs
# kubectl get pods -n application
# kubectl get virtualservice -n application simplemiddle -o yaml
# kubectl get destinationrule -n application simplemiddle -o yaml
# kubectl log -n application simplemiddle-1-4-0-rc0-1541094960-zzfrl
# curl http://simplemiddle.eksb-useast1.eks.eis-deliverydevqa.cloud/search?q=moon
# kubectl get svc -n monitoring prometheus
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment