summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-06-23 22:59:24 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-23 22:59:24 +0000
commit556619df6b2e61f3aefcfdf837f2a99d18b3b7d9 (patch)
treedcd66f72e2d5650e82ff84d9d480ba93f38702de /ci
parent6e0230a7d574e611fdf3892b5e58f10a86f66d48 (diff)
parent6dd155877ed597c8b5d881c80fa50f9bd810a0e1 (diff)
Merge "move k8s command from jumphost to kubernetes-master"
Diffstat (limited to 'ci')
-rwxr-xr-xci/k8.sh24
1 files changed, 5 insertions, 19 deletions
diff --git a/ci/k8.sh b/ci/k8.sh
index 5e0f4a49..551c4a27 100755
--- a/ci/k8.sh
+++ b/ci/k8.sh
@@ -2,24 +2,10 @@
set -ex
juju run-action kubernetes-worker/0 microbot replicas=3
sleep 30
-mkdir -p ~/.kube || true
-juju scp kubernetes-master/0:config ~/.kube/config || true
-
-if [ ! -f /snap/kubectl/current/kubectl ]; then
- sudo apt-get install snapd -y
- sudo snap install kubectl --classic
-fi
-
-if [ ! -f ./kubectl ]; then
- ln -s /snap/kubectl/current/kubectl ./kubectl
-fi
-
-./kubectl cluster-info || true
juju config kubernetes-master enable-dashboard-addons=true || true
-#./kubectl proxy
-#http://localhost:8001/ui
-./kubectl get nodes || true
-#./kubectl create -f example.yaml || true
-./kubectl get pods --all-namespaces || true
-./kubectl get services,endpoints,ingress --all-namespaces || true
juju expose kubernetes-worker || true
+
+juju ssh kubernetes-master/0 "/snap/bin/kubectl cluster-info"
+juju ssh kubernetes-master/0 "/snap/bin/kubectl get nodes"
+juju ssh kubernetes-master/0 "/snap/bin/kubectl get pods --all-namespaces"
+juju ssh kubernetes-master/0 "/snap/bin/kubectl get services,endpoints,ingress --all-namespaces"