mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
hack/local-up-cluster: modify cloud provider launch to work with aws
This commit updates the local-up-cluster script to set the proper provider id when the aws cloud provider is used.
This commit is contained in:
parent
0273d43ae9
commit
a8a00f690e
@ -696,7 +696,11 @@ function start_kubelet {
|
||||
cloud_config_arg=("--cloud-provider=${CLOUD_PROVIDER}" "--cloud-config=${CLOUD_CONFIG}")
|
||||
if [[ "${EXTERNAL_CLOUD_PROVIDER:-}" == "true" ]]; then
|
||||
cloud_config_arg=("--cloud-provider=external")
|
||||
cloud_config_arg+=("--provider-id=$(hostname)")
|
||||
if [[ "${CLOUD_PROVIDER:-}" == "aws" ]]; then
|
||||
cloud_config_arg+=("--provider-id=$(curl http://169.254.169.254/latest/meta-data/instance-id)")
|
||||
else
|
||||
cloud_config_arg+=("--provider-id=$(hostname)")
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "/var/lib/kubelet" &>/dev/null || sudo mkdir -p "/var/lib/kubelet"
|
||||
|
Loading…
Reference in New Issue
Block a user