kubernetes / cloud-provider-gcp

cloud-provider-gcp contains several projects used to run Kubernetes in Google Cloud
Apache License 2.0
121 stars 209 forks source link

Internal Loadbalancers don't work if a cluster is using custom mode subnets #612

Open upodroid opened 1 year ago

upodroid commented 1 year ago

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kops/15972/pull-kops-kubernetes-e2e-cos-gce-slow/1707525650782359552

 mahamed  REDACTED  ~  $  curl -s https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kops/15972/pull-kops-kubernetes-e2e-cos-gce-slow/1707525650782359552/artifacts/cluster-info/kube-system/cloud-controller-manager-nbgbm/logs.txt | grep lb-internal | head -10
I0928 23:17:57.922612       1 controller.go:397] Ensuring load balancer for service loadbalancers-2999/lb-internal
I0928 23:17:57.922679       1 controller.go:906] Adding finalizer to service loadbalancers-2999/lb-internal
I0928 23:17:57.923315       1 event.go:307] "Event occurred" object="loadbalancers-2999/lb-internal" fieldPath="" kind="Service" apiVersion="v1" type="Normal" reason="EnsuringLoadBalancer" message="Ensuring load balancer"
E0928 23:18:27.799181       1 gce_loadbalancer.go:206] Failed to EnsureLoadBalancer(e2e-pr15972-pull-kops-kubernetes-e2e-cos-gce-slow-k8s-local, loadbalancers-2999, lb-internal, a95259e9dc5fe403282161291b197790, us-east4), err: googleapi: Error 400: Invalid value for field 'resource.subnetwork': ''. Network interface must specify a subnet if the network resource is in custom subnet mode., invalid
E0928 23:18:27.799521       1 controller.go:298] error processing service loadbalancers-2999/lb-internal (retrying with exponential backoff): failed to ensure load balancer: googleapi: Error 400: Invalid value for field 'resource.subnetwork': ''. Network interface must specify a subnet if the network resource is in custom subnet mode., invalid
I0928 23:18:27.799882       1 event.go:307] "Event occurred" object="loadbalancers-2999/lb-internal" fieldPath="" kind="Service" apiVersion="v1" type="Warning" reason="SyncLoadBalancerFailed" message="Error syncing load balancer: failed to ensure load balancer: googleapi: Error 400: Invalid value for field 'resource.subnetwork': ''. Network interface must specify a subnet if the network resource is in custom subnet mode., invalid"
I0928 23:20:53.782977       1 controller.go:397] Ensuring load balancer for service loadbalancers-2999/lb-internal
I0928 23:20:53.784454       1 event.go:307] "Event occurred" object="loadbalancers-2999/lb-internal" fieldPath="" kind="Service" apiVersion="v1" type="Normal" reason="EnsuringLoadBalancer" message="Ensuring load balancer"
E0928 23:20:57.892662       1 gce_loadbalancer.go:206] Failed to EnsureLoadBalancer(e2e-pr15972-pull-kops-kubernetes-e2e-cos-gce-slow-k8s-local, loadbalancers-2999, lb-internal, a95259e9dc5fe403282161291b197790, us-east4), err: googleapi: Error 400: Invalid value for field 'resource.subnetwork': ''. Network interface must specify a subnet if the network resource is in custom subnet mode., invalid
E0928 23:20:57.893048       1 controller.go:298] error processing service loadbalancers-2999/lb-internal (retrying with exponential backoff): failed to ensure load balancer: googleapi: Error 400: Invalid value for field 'resource.subnetwork': ''. Network interface must specify a subnet if the network resource is in custom subnet mode., invalid

kube-up creates subnets in auto-mode subnets, kops creates subnets in custom mode

Worth mentioning that no really uses auto mode subnets in prod(you can't control the IPs of the subnets)

/kind bug

k8s-ci-robot commented 1 year ago

This issue is currently awaiting triage.

If the repository mantainers determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
aojea commented 1 year ago

/assign @cezarygerard @code-elinka

k8s-triage-robot commented 8 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

upodroid commented 8 months ago

/remove-lifecycle stale /priority important-soon

k8s-triage-robot commented 5 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 4 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

upodroid commented 3 months ago

not rotten