Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Kubeip not replacing IPs if node's access config name != external-nat #60

Merged

Conversation

ureesoriano
Copy link
Contributor

The steps that Kubeip follows to replace an ephemeral IP with an
external IP on a given node, among others, are:

  • Delete the node's access config called 'external-nat'.
  • Create a new access config for the node with a free external IP.

If the node's access config has a name different than 'external-nat', it
doesn't get deleted and, when attempting to add another access config with
the external IP, the GCloud API returns a 400:

"googleapi: Error 400: At most one access config currently supported.
badRequest"

To work this around, instead of assuming that the access config will be
called 'external-nat', actively retrieve the access config name and use
this retrieved name to issue the DeleteAccessConfig request.

The steps that Kubeip follows to replace an ephemeral IP with an
external IP on a given node, among others, are:
* Delete the node's access config called 'external-nat'.
* Create a new access config for the node with a free external IP.

If the node's access config has a name different than 'external-nat', it
doesn't get deleted and, when attempting to add another access config with
the external IP, the GCloud API returns a 400:

"googleapi: Error 400: At most one access config currently supported.
badRequest"

To work this around, instead of assuming that the access config will be
called 'external-nat', actively retrieve the access config name and use
this retrieved name to issue the DeleteAccessConfig request.
@avivl avivl merged commit 042d76f into doitintl:master Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants