Search code examples
kubernetesopenshift-3aws-sdk-go

Openshift 3.11 cloud integration fails with lookup RequestError: send request failed\\ncaused by: Post https://ec2.eu-west-.amazonaws.com


Following the docs: https://docs.openshift.com/container-platform/3.11/install_config/configuring_aws.html#aws-cluster-labeling

Configuring the cloud integration after the cluster build.

When the cluster services are restarted on the masters it fails looking up AWS instances:

22 16:32:10.112895   75995 server.go:261] failed to run Kubelet: could not init cloud provider "aws": error finding instance i-0c5cbd50923f9c6d2: "error listing AWS instances: \"Request.service: main process exited, code=exited, status=255/n/a Error: send request failed\\ncaused by: Post https://ec2.eu-west-.amazonaws.com/: dial tcp: lookup ec2.eu-west-.amazonaws.com: no such host\""

On closer inspection seems to be due to incorrect hostname:

https://ec2.eu-west-.amazonaws.com/ VS https://ec2.eu-west-2.amazonaws.com/

So I double checked the config, which seems to be correct:

# cat /etc/origin/cloudprovider/aws.conf
[Global]
Zone = eu-west-2

Had a google and it seems to be a similar issue to this:

https://github.com/kubernetes-sigs/kubespray/issues/4345

Is there a way to work around this? Moving off 3.11 isn't an option right now.

Thanks.


Solution

  • Looks as though it needs to be zone, rather than the region.

    # cat /etc/origin/cloudprovider/aws.conf
    [Global]
    Zone = eu-west-2a