Change external IP of AWS Node

I am running a cluster with a single AWS node.

This node restarted and now has a different IP address. Now rancher is showing it as unavailable

"This cluster is currently Unavailable; areas that interact directly with it will not be available until the API is ready.

Failed to communicate with API server: Get https://<IP>:6443/api/v1/componentstatuses: waiting for cluster agent to connect"

How do I change the IP? Also how can make sure new nodes on AWS gets created with an elastic IP?

2 Likes

I had a similar question here Expected behavior when a node gets a new IP but no responses. :frowning:

Likewise. RancherOS 1.4, Rancher 2.0.4. I was trying to switch my nodes from dynamic to static DHCP and now my cluster is unavailable. This is concerning for the same reason @praveenperera noted–if I have nodes in the cloud and they reboot unexpectedly, how can I make sure they rejoin the cluster?

2 Likes

I am running into this problem now, it breaks the rancher cli’s ssh as-well as heapster. I just tried to basically reimport the node with the following generated command, and it doesn’t seem to have an effect. This was based on a lot of older issues that talked about change the CATTLE_AGENT_IP.

sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.0.4 --server https://rancher.aquilacashflow.com --token TOKEN --address IP_ADDRESS --worker

1 Like

Did you find a solution ?

I tried a bunch of things, but ultimately I was unable to find a solution. I ended remaking the cluster again. I had some older backups of the YAML files which made things a little easier. Now I don’t run it with a single node, I run a 3 node cluster. So if one of the node’s IP changes I will remove it and rancher will automatically launch a new node.

PS: digitalocean has a better elastic IP system, they allow you to make nodes current IP “elastic” instead of having to assign it a new IP

That what I was thinking I could do.

The problem I had was that since it was a dev server, it was stopped for a comple of days and all the ips were changed so I coundn’t do a rollover.

I guess you could create the nodes manually in EC2, attach the elastic IPs and then do a custom rancher deployment.

Could you please specify what you mean for “custom rancher deployment” ?

Could you please give steps ? I have exactly the same problem if a node goes down and then back up with a new IP from EC2 Rancher does not realize it. I mean guys these are big bugs including the one where you cannot manage in any way to connect to the ECR repository and pull images from there.

Is this product ready for production ? Are we sure ? It looks to me it is full of bugs but big and potentially very dangerous to be used in a production environment. I am not really willing to put my company in the hands of a product that basically is a little more than a beta …

Hi,

I have some success with amazon eip. After creating my cluster in rancher, assign an eip to your nodes in the aws console. Then navigate to the nodes tab in rancher and edit the node you just gave an eip to by assigning the rke.cattle.io/external-ip value to your eip:

image