mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
allow to set local kubeconfig and update the prompt
This commit is contained in:
parent
821e171247
commit
544e7aaee4
@ -459,7 +459,7 @@ function start_apiserver {
|
|||||||
AUTH_ARGS="--token=system:admin/system:masters"
|
AUTH_ARGS="--token=system:admin/system:masters"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# default to use certificate authentication
|
# default to the admin client cert/key
|
||||||
AUTH_ARGS="--client-key=${CERT_DIR}/client-admin.key --client-certificate=${CERT_DIR}/client-admin.crt"
|
AUTH_ARGS="--client-key=${CERT_DIR}/client-admin.key --client-certificate=${CERT_DIR}/client-admin.crt"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -688,7 +688,12 @@ fi
|
|||||||
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
||||||
echo
|
echo
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
To start using your cluster, open up another terminal/tab and run:
|
To start using your cluster, you can open up another terminal/tab and run:
|
||||||
|
|
||||||
|
export KUBECONFIG=${CERT_DIR}/admin.kubeconfig
|
||||||
|
cluster/kubectl.sh
|
||||||
|
|
||||||
|
Alternatively, you can write to the default kubeconfig:
|
||||||
|
|
||||||
export KUBERNETES_PROVIDER=local
|
export KUBERNETES_PROVIDER=local
|
||||||
|
|
||||||
@ -734,7 +739,7 @@ echo "Detected host and ready to start services. Doing some housekeeping first.
|
|||||||
echo "Using GO_OUT $GO_OUT"
|
echo "Using GO_OUT $GO_OUT"
|
||||||
KUBELET_CIDFILE=/tmp/kubelet.cid
|
KUBELET_CIDFILE=/tmp/kubelet.cid
|
||||||
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting services now!"
|
echo "Starting services now!"
|
||||||
|
Loading…
Reference in New Issue
Block a user