mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #20408 from kylegordon/patch-1
Use kube account to make changes via govc
This commit is contained in:
commit
9a76c022ec
@ -188,6 +188,7 @@ function kube-up-vm {
|
||||
govc vm.ip "${vm_name}" > /dev/null
|
||||
|
||||
govc guest.mkdir \
|
||||
-l "kube:kube" \
|
||||
-vm="${vm_name}" \
|
||||
-p \
|
||||
/home/kube/.ssh
|
||||
@ -195,6 +196,7 @@ function kube-up-vm {
|
||||
ssh-add -L > "${KUBE_TEMP}/${vm_name}-authorized_keys"
|
||||
|
||||
govc guest.upload \
|
||||
-l "kube:kube" \
|
||||
-vm="${vm_name}" \
|
||||
-f \
|
||||
"${KUBE_TEMP}/${vm_name}-authorized_keys" \
|
||||
@ -209,7 +211,7 @@ function kube-run {
|
||||
local vm_name="$1"
|
||||
local file="$2"
|
||||
local dst="/tmp/$(basename "${file}")"
|
||||
govc guest.upload -vm="${vm_name}" -f -perm=0755 "${file}" "${dst}"
|
||||
govc guest.upload -l "kube:kube" -vm="${vm_name}" -f -perm=0755 "${file}" "${dst}"
|
||||
echo "uploaded ${file} to ${dst}"
|
||||
local vm_ip
|
||||
vm_ip=$(govc vm.ip "${vm_name}")
|
||||
|
Loading…
Reference in New Issue
Block a user