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

Ingress stil trying to add nodes to instance groups when using NEGs #1177

Closed
tlbdk opened this issue Jul 9, 2020 · 9 comments
Closed

Ingress stil trying to add nodes to instance groups when using NEGs #1177

tlbdk opened this issue Jul 9, 2020 · 9 comments
Assignees
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@tlbdk
Copy link

tlbdk commented Jul 9, 2020

We are using ingress-nginx with a manual load balancer in front but are looking to migrate to GCE ingress with NEG and would like to run both for a while. In theory this should be possible as there should be no reason for the GCE ingress to add the nodes to a load-balancer instance group when using NEG. But it seems to do this anyway and fails because the nodes already are added to a manual group. Is this a bug or is there are reason to do this?

apiVersion: v1
kind: Service
metadata:
  name: wikijs
  annotations:
    cloud.google.com/neg: '{"ingress": true}'
  labels:
    app: wikijs
spec:
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: 3000
  type: ClusterIP
  selector:
    app: wikijs
apiVersion: networking.gke.io/v1beta2
kind: ManagedCertificate
metadata:
  name: wikijs-domain-tld-2020-07-08
spec:
  domains:
    - wikijs.domain.tld
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: wikijs
  annotations:
    kubernetes.io/ingress.class: "gce"
    kubernetes.io/ingress.global-static-ip-name: "1.2.3.4"
    networking.gke.io/managed-certificates: "wikijs-2020-07-08"
spec:
  tls:
  - hosts:
    - wikijs.domain.tld
  rules:
  - host: wikijs.domain.tld
    http:
      paths:
      - path: /
        backend:
          serviceName: wikijs
          servicePort: 80

kubectl describe service wikijs

Name:              wikijs
Namespace:         default
Labels:            app=wikijs
Annotations:       cloud.google.com/neg: {"ingress": true}
                   cloud.google.com/neg-status:
                     {"network_endpoint_groups":{"80":"k8s1-f1d6835a-default-wikijs-80-f8349d79"},"zones":["europe-west1-b","europe-west1-c","europe-west1-d"]}
                   kubectl.kubernetes.io/last-applied-configuration:
                     {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"cloud.google.com/neg":"{\"ingress\": true}"},"labels":{"app":"wikijs"},"na...
Selector:          app=wikijs
Type:              ClusterIP
IP:                10.111.14.185
Port:              http  80/TCP
TargetPort:        3000/TCP
Endpoints:         
Session Affinity:  None
Events:            <none>

kubectl describe ingresses wikijs

Name:             wikijs
Namespace:        default
Address:          
Default backend:  default-http-backend:80 (10.44.0.6:8080)
TLS:
  SNI routes wikijs.domain.tld
Rules:
  Host                     Path  Backends
  ----                     ----  --------
  wikijs.domain.tld  
                           /   wikijs:80 (10.44.4.5:3000)
Annotations:
  ...

  kubernetes.io/ingress.class:                  gce
  kubernetes.io/ingress.global-static-ip-name:  1.2.3.4
  networking.gke.io/managed-certificates:       wikijs-domain-tld-2020-07-08
  ingress.gcp.kubernetes.io/pre-shared-cert:    mcrt-21e827f1-82e7-4255-bd1d-3ebdc7ecfc8d
Events:
  Type     Reason  Age               From                     Message
  ----     ------  ----              ----                     -------
  Normal   ADD     2m47s             loadbalancer-controller  default/wikijs
  Warning  Sync    6s (x5 over 98s)  loadbalancer-controller  Error during sync: error running backend syncing routine: received errors when updating backend service: googleapi: Error 400: INSTANCE_IN_MULTIPLE_LOAD_BALANCED_IGS - Validation failed for instance 'projects/someproject/zones/europe-west1-b/instances/gke-public-default-pool-cdc4d452-ou7a': instance may belong to at most one load-balanced instance group.
googleapi: Error 400: INSTANCE_IN_MULTIPLE_LOAD_BALANCED_IGS - Validation failed for instance 'projects/someproject/zones/europe-west1-b/instances/gke-public-default-pool-cdc4d452-ou7a': instance may belong to at most one load-balanced instance group.
@rramkumar1
Copy link
Contributor

Assigning @freehan to take a look

@bowei
Copy link
Member

bowei commented Aug 11, 2020

@rramkumar1 can you take this bug back from freehan?

@bowei
Copy link
Member

bowei commented Aug 12, 2020

@tlbdk can you post your cluster version

@tlbdk
Copy link
Author

tlbdk commented Aug 12, 2020

1.16.11-gke.5

@freehan
Copy link
Contributor

freehan commented Aug 25, 2020

The fix is already merged #1105
It is included in the 1.17+ versions.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 23, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 23, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants