aboutsummaryrefslogtreecommitdiff
path: root/contrib/kubernetes/testscripts/10_setup_kubectl.sh
blob: 17786715f4246224116e44649a19e33f5420b68c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

set -e

PWD=`pwd`
BASEDIR=`readlink -e $(dirname ${0})`

cd ${BASEDIR}

echo "Setting up kubectl..."

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"