mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Fixed 'Invalid endpoint: https://ec2.us-east-.amazonaws.com'. #24420 #24020
This commit is contained in:
parent
cb9a85166c
commit
be2633a0a1
@ -95,7 +95,12 @@ source "${KUBE_ROOT}/cluster/aws/${OS_DISTRIBUTION}/util.sh"
|
||||
load_distro_utils
|
||||
|
||||
# This removes the final character in bash (somehow)
|
||||
AWS_REGION=${ZONE%?}
|
||||
re='[a-zA-Z]'
|
||||
if [[ ${ZONE: -1} =~ $re ]]; then
|
||||
AWS_REGION=${ZONE%?}
|
||||
else
|
||||
AWS_REGION=$ZONE
|
||||
fi
|
||||
|
||||
export AWS_DEFAULT_REGION=${AWS_REGION}
|
||||
export AWS_DEFAULT_OUTPUT=text
|
||||
|
Loading…
Reference in New Issue
Block a user