Created
August 1, 2018 16:07
-
-
Save jannylund/97be256ab5d99175ef0c6a5398fb60ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the K8S_URL and Token from Rancher Cluster level Kubeconfig (logged in as the CI user) | |
export K8S_URL=https://<rancherurl>/k8s/clusters/<clusterid> | |
export TOKEN=<RANCHERTOKEN> | |
export NAMESPACE=<kubernetes-namespace> | |
# Typically these are identical. Check from the YAML file of your deployment. | |
export DEPLOYMENT=<deployment-name> | |
export CONTAINER=<container-name> | |
# The docker-image-version must be updated every time you built a new container. | |
export IMAGE=<docker-image>:<docker-image-version> | |
kubectl --server=${K8S_URL} \ | |
--insecure-skip-tls-verify=true \ | |
--token=${TOKEN} \ | |
--namespace=${NAMESPACE} \ | |
set image deployment/${DEPLOYMENT} ${CONTAINER}=${IMAGE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment