mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #87772 from dims/ensure-kubectl-is-in-default-PATH
Ensure kubectl is available in default PATH
This commit is contained in:
commit
e31f29ca66
@ -2563,6 +2563,11 @@ EOF
|
|||||||
function override-kubectl {
|
function override-kubectl {
|
||||||
echo "overriding kubectl"
|
echo "overriding kubectl"
|
||||||
echo "export PATH=${KUBE_HOME}/bin:\$PATH" > /etc/profile.d/kube_env.sh
|
echo "export PATH=${KUBE_HOME}/bin:\$PATH" > /etc/profile.d/kube_env.sh
|
||||||
|
|
||||||
|
# source the file explicitly otherwise we have
|
||||||
|
# issues on a ubuntu OS image finding the kubectl
|
||||||
|
source /etc/profile.d/kube_env.sh
|
||||||
|
|
||||||
# Add ${KUBE_HOME}/bin into sudoer secure path.
|
# Add ${KUBE_HOME}/bin into sudoer secure path.
|
||||||
local sudo_path
|
local sudo_path
|
||||||
sudo_path=$(sudo env | grep "^PATH=")
|
sudo_path=$(sudo env | grep "^PATH=")
|
||||||
|
Loading…
Reference in New Issue
Block a user