coredns/middleware/kubernetes/test/10_setup_kubectl.sh
Michael Richmond 8dec292668 Fix Travis IPv6 and add k8s integration testing to CI (#194)
Updating travis yaml file to:
* Force IPv6 to work in their VM environment
* Enable docker (requires VM environment and sudo)
* Run kubernetes integration tests in Travis
2016-07-27 10:01:24 -07:00

18 lines
459 B
Bash
Executable file

#!/bin/bash
PWD=`pwd`
BASEDIR=`readlink -e $(dirname ${0})`
cd ${BASEDIR}
if [ ! -e kubectl ]; then
curl -O http://storage.googleapis.com/kubernetes-release/release/v1.2.4/bin/linux/amd64/kubectl
chmod u+x kubectl
fi
${BASEDIR}/kubectl config set-cluster test-doc --server=http://localhost:8080
${BASEDIR}/kubectl config set-context test-doc --cluster=test-doc
${BASEDIR}/kubectl config use-context test-doc
cd ${PWD}
alias kubctl="${BASEDIR}/kubectl"