1. Fix the error of source the wrong config file in startup.sh
2. Fix the error of adding the KUBECONFIG to the ~/.profile, which
would not be sourced when starting a BASH, it should be set in
~/.bashrc.
Change-Id: I98051d824788e9d950dc6b0b0634e08ea6bfe14d
Signed-off-by: trevor tao <trevor.tao@arm.com>
if [ "$(id -u)" = 0 ]; then
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" | \
- tee -a "${HOME}/.profile"
+ tee -a "${HOME}/.bashrc"
# shellcheck disable=SC1090
- source "${HOME}/.profile"
+ source "${HOME}/.bashrc"
else
mkdir -p "${HOME}/.kube"
sudo cp -i /etc/kubernetes/admin.conf "${HOME}/.kube/config"