mirror of https://github.com/k3s-io/k3s
make ./kubectl.sh work with juju provider
parent
5d19597ffa
commit
52112ad985
|
@ -58,7 +58,7 @@ function kube-down() {
|
|||
function detect-master() {
|
||||
local kubestatus
|
||||
# Capturing a newline, and my awk-fu was weak - pipe through tr -d
|
||||
kubestatus=$(juju status --format=oneline kubernetes-master | awk '{print $3}' | tr -d "\n")
|
||||
kubestatus=$(juju status --format=oneline kubernetes-master | grep kubernetes-master/0 | awk '{print $3}' | tr -d "\n")
|
||||
export KUBE_MASTER_IP=${kubestatus}
|
||||
export KUBE_MASTER=${KUBE_MASTER_IP}
|
||||
export KUBERNETES_MASTER=http://${KUBE_MASTER}:8080
|
||||
|
|
|
@ -105,7 +105,7 @@ if [[ "$KUBERNETES_PROVIDER" == "gke" ]]; then
|
|||
config=(
|
||||
"--context=gke_${PROJECT}_${ZONE}_${CLUSTER_NAME}"
|
||||
)
|
||||
elif [[ "$KUBERNETES_PROVIDER" == "ubuntu" ]]; then
|
||||
elif [[ "$KUBERNETES_PROVIDER" == "ubuntu" || "$KUBERNETES_PROVIDER" == "juju" ]]; then
|
||||
detect-master > /dev/null
|
||||
config=(
|
||||
"--server=http://${KUBE_MASTER_IP}:8080"
|
||||
|
|
Loading…
Reference in New Issue