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

Creating GCE external load balancer fails #106

Open
ldx opened this issue May 27, 2020 · 3 comments
Open

Creating GCE external load balancer fails #106

ldx opened this issue May 27, 2020 · 3 comments
Labels
bug Something isn't working GCE

Comments

@ldx
Copy link
Contributor

ldx commented May 27, 2020

The GCE cloud provider in k8s does not like the fact that there's no cloud instance called virtual-kubelet:

default 3s Normal EnsuringLoadBalancer service/nginx Ensuring load balancer
default 3s Warning CreatingLoadBalancerFailed service/nginx Error creating load balancer (will retry): failed to ensure load balancer for service default/nginx: instance not found

Whether we use host network mode or not does not matter though. It's hard-coded in the GCE cloud plugin to list all nodes and bail if any of them is not a GCE VM instance: https://github.com/kubernetes/legacy-cloud-providers/blob/master/gce/gce_loadbalancer_external.go#L59-L62

@ldx ldx added bug Something isn't working GCE labels May 27, 2020
@ldx
Copy link
Contributor Author

ldx commented May 31, 2020

Adding the alpha.service-controller.kubernetes.io/exclude-balancer or node.kubernetes.io/exclude-from-external-load-balancers label to the virtual-kubelet node excludes it from LBs. However, this needs the ServiceNodeExclusion feature gate, which is still alpha in Kubernetes: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/

Creating an alpha cluster in GKE will enable the feature gate, however, alpha clusters are not supported for production workloads: https://cloud.google.com/kubernetes-engine/docs/concepts/alpha-clusters

@ldx
Copy link
Contributor Author

ldx commented Jun 1, 2020

ServiceNodeExclusion will graduate to beta and will be on by default in 1.19: kubernetes/kubernetes@2369ef0

@ldx
Copy link
Contributor Author

ldx commented Jun 1, 2020

Adding the alpha.service-controller.kubernetes.io/exclude-balancer label will make gce-ingress work (not with container-native load balancing, though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GCE
Projects
None yet
Development

No branches or pull requests

1 participant