Skip to content

Commit a8a00f6

Browse files
committed
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.
1 parent 0273d43 commit a8a00f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hack/local-up-cluster.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,11 @@ function start_kubelet {
696696
cloud_config_arg=("--cloud-provider=${CLOUD_PROVIDER}" "--cloud-config=${CLOUD_CONFIG}")
697697
if [[ "${EXTERNAL_CLOUD_PROVIDER:-}" == "true" ]]; then
698698
cloud_config_arg=("--cloud-provider=external")
699-
cloud_config_arg+=("--provider-id=$(hostname)")
699+
if [[ "${CLOUD_PROVIDER:-}" == "aws" ]]; then
700+
cloud_config_arg+=("--provider-id=$(curl http://169.254.169.254/latest/meta-data/instance-id)")
701+
else
702+
cloud_config_arg+=("--provider-id=$(hostname)")
703+
fi
700704
fi
701705

702706
mkdir -p "/var/lib/kubelet" &>/dev/null || sudo mkdir -p "/var/lib/kubelet"

0 commit comments

Comments
 (0)