We are using Google Cloud Platform. We have a few machines in one of the subnets. Now we want to run containers in these machines. In case of a machine crash, we want to move the container to another host however, we want it to come with the same IP address. Is this achievable?

  • According to the GCP documentation, you can set a static internal target IP address using routes for it to persist after an instance is shut down, but that particular static IP would need to be one that is not in use in your project, so not sure it's possible. See: cloud.google.com/compute/docs/… and cloud.google.com/compute/docs/… – David B. Jan 19 '17 at 14:35
  • 1
    Can you elaborate further on the question and let us know what type of IP addresses are you interested to move? external IP addresses or internal IP addresses of VMs? – Kamran Jan 20 '17 at 23:52

If you use GKE, you can expose the service behind a Load Balancer. If a node crashes you do not have to worry since either the PODs will be reassigned or the node recreated. There is an example here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.