mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 11:12:03 +00:00
Don't print Kubernetes username/password to console.
It is too easy to copy/paste this on-line. Fixes #1483
This commit is contained in:
@@ -22,11 +22,11 @@ source $(dirname $0)/provision-config.sh
|
||||
minion_ip_array=(${MINION_IPS//,/ })
|
||||
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
minion=${MINION_NAMES[$i]}
|
||||
ip=${minion_ip_array[$i]}
|
||||
ip=${minion_ip_array[$i]}
|
||||
if [ ! "$(cat /etc/hosts | grep $minion)" ]; then
|
||||
echo "Adding $minion to hosts file"
|
||||
echo "$ip $minion" >> /etc/hosts
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Update salt configuration
|
||||
@@ -68,7 +68,6 @@ EOF
|
||||
# Configure nginx authorization
|
||||
mkdir -p $KUBE_TEMP
|
||||
mkdir -p /srv/salt/nginx
|
||||
echo "Using password: $MASTER_USER:$MASTER_PASSWD"
|
||||
python $(dirname $0)/../../third_party/htpasswd/htpasswd.py -b -c ${KUBE_TEMP}/htpasswd $MASTER_USER $MASTER_PASSWD
|
||||
MASTER_HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd)
|
||||
echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd
|
||||
|
@@ -39,7 +39,7 @@ function verify-prereqs {
|
||||
}
|
||||
|
||||
# Instantiate a kubernetes cluster
|
||||
function kube-up {
|
||||
function kube-up {
|
||||
|
||||
get-password
|
||||
vagrant up
|
||||
@@ -74,7 +74,7 @@ function kube-up {
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo
|
||||
echo "Waiting for each minion to be registered with cloud provider"
|
||||
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
@@ -85,13 +85,16 @@ function kube-up {
|
||||
COUNT=$(grep -c ${MINION_NAMES[i]} /tmp/minions) || { printf "."; sleep 2; COUNT="0"; }
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo
|
||||
echo "Kubernetes cluster created."
|
||||
echo
|
||||
echo "Kubernetes cluster is running. Access the master at:"
|
||||
echo "Kubernetes cluster is running. The master is running at:"
|
||||
echo
|
||||
echo " https://${KUBE_MASTER_IP}"
|
||||
echo
|
||||
echo "The user name and password to use is located in ~/.kubernetes_auth."
|
||||
echo
|
||||
echo " https://${user}:${passwd}@${KUBE_MASTER_IP}"
|
||||
}
|
||||
|
||||
# Delete a kubernetes cluster
|
||||
|
Reference in New Issue
Block a user