mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 12:32:34 +02:00
deploy.sh and rollback.sh fixes (#99)
* Don't overwrite KUBECONFIG. kubectl already knows to look in $HOME/.kube or use $KUBECONFIG. https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable * Use $DIR instead of pwd. https://stackoverflow.com/a/246128/1881379 * chmod +x kubernetes/rollback.sh
This commit is contained in:
parent
2022b220fd
commit
a6c087005f
2 changed files with 11 additions and 16 deletions
8
kubernetes/rollback.sh
Normal file → Executable file
8
kubernetes/rollback.sh
Normal file → Executable file
|
@ -2,6 +2,8 @@
|
|||
|
||||
# Roll back kube-dns to the cluster which has CoreDNS installed.
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
show_help () {
|
||||
cat << USAGE
|
||||
usage: $0 [ -i DNS-IP ] [ -d CLUSTER-DOMAIN ]
|
||||
|
@ -14,12 +16,12 @@ exit 0
|
|||
}
|
||||
|
||||
|
||||
curl -L https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/dns/kube-dns/kube-dns.yaml.base > `pwd`/kube-dns.yaml.sed
|
||||
|
||||
# Simple Defaults
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
CLUSTER_DOMAIN=cluster.local
|
||||
YAML_TEMPLATE=`pwd`/kube-dns.yaml.sed
|
||||
YAML_TEMPLATE="$DIR/kube-dns.yaml.sed"
|
||||
|
||||
curl -L https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/dns/kube-dns/kube-dns.yaml.base > "$YAML_TEMPLATE"
|
||||
|
||||
# Get Opts
|
||||
while getopts "hi:d:" opt; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue