mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-31 16:46:54 +00:00
Merge pull request #40193 from xilabao/add-basic-auth-to-local-cluster
Automatic merge from submit-queue add basic auth option to apiserver in local cluster Add this can fix #40192 @liggitt
This commit is contained in:
@@ -459,7 +459,7 @@ function start_apiserver {
|
||||
AUTH_ARGS="--token=system:admin/system:masters"
|
||||
fi
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
@@ -688,7 +688,12 @@ fi
|
||||
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
||||
echo
|
||||
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
|
||||
|
||||
|
Reference in New Issue
Block a user