Skip to content

Instantly share code, notes, and snippets.

@rimusz
Created September 25, 2016 23:54
Show Gist options
  • Save rimusz/ea6ea8e862a56a95e2089ce310b554a8 to your computer and use it in GitHub Desktop.
Save rimusz/ea6ea8e862a56a95e2089ce310b554a8 to your computer and use it in GitHub Desktop.
Kubernetes-Dashboard Auto Refresh Script
#!/usr/bin/env bash
set -eu -o pipefail
DASHBOARD_REPO_PATH="${DASHBOARD_REPO_PATH:-"/home/cole/code/colemickens/dashboard"}"
REGISTRY="${REGISTRY:-"docker.io/colemickens"}"
cd "${DASHBOARD_REPO_PATH}"
git remote update
git reset --hard kubernetes/master
VERSION="$(git describe --always --dirty)"
REGISTRY="${REGISTRY%/}"
IMAGE_SPEC="${REGISTRY}/kubernetes-dashboard-amd64:${VERSION}"
./build/run-gulp-in-docker.sh docker-image:canary
docker tag "gcr.io/google_containers/kubernetes-dashboard-amd64:canary" "${IMAGE_SPEC}"
docker push "${IMAGE_SPEC}"
kubectl --namespace=kube-system set image deployment/kubernetes-dashboard "kubernetes-dashboard=${IMAGE_SPEC}"
kubectl --namespace=kube-system rollout status deployment/kubernetes-dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment