Cannot access services with externalIPs property

Problem

You cannot access Google Kubernetes Engine services exposed with the externalIPs property.
 

Environment

  • Google Kubernetes Engine nodes running on version 1.18 or higher.
  • Any service type with externalIPs property.

Solution

This is not supported by Google Kubernetes Engine. You must expose a service using a LoadBalancer service type.

Cause

The externalIPs property binds a service to an IP address which can be different from the node's IP address, providing a floating IP address serving multiple nodes, typically in Kubernetes bare metal deployments.

For this to work properly in Google Cloud Platform, IP forwarding must be enabled on the Google Kubernetes Engine nodes. However, IP forwarding is disabled for Virtual Private Cloud native Google Kubernetes Engine clusters in Google Kubernetes Engine version 1.18 and above, which prevents the usage of customer-defined externalIPs property.