Add admin account on master for kube-up

Creates a master local admin account.
If you are on the master you can now run kubectl.
For issue 87481.
This commit is contained in:
Walter Fender 2020-05-06 17:19:58 -07:00
parent 8c4e3faed3
commit 339918d206

View File

@ -2564,6 +2564,10 @@ function gke-master-start {
echo "Running GKE internal configuration script"
. "${KUBE_HOME}/bin/gke-internal-configure-helper.sh"
gke-internal-master-start
elif [[ -n "${KUBE_BEARER_TOKEN:-}" ]]; then
echo "setting up local admin kubeconfig"
create-kubeconfig "local-admin" "${KUBE_BEARER_TOKEN}"
echo "export KUBECONFIG=/etc/srv/kubernetes/local-admin/kubeconfig" > /etc/profile.d/kubeconfig.sh
fi
}