Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
GET request with body rejected by GKE

I am running a FastAPI backend service on GKE. There's a legacy endpoint that uses a GET request with body attached to it. I know that GET requests are not supposed to have a body, but this is a legacy endpoint used by a library therefore I have no choice but to support it.

Currently when a GET request with body is send to GKE, I get the following response: enter image description here

I have tested the endpoint locally and it works without issues. I don't know exactly what the issue is but GCP is definitely intercepting the request at some point and rejecting it due to it having a body.

The only workaround I can think of currently is using a some sort of proxy and converting the request before it reaches GKE. Unfortunately, I'm not a GCP expert.

Has anyone had any experience tackling an issue like this? What would be an optimal solution here, granted that the endpoint has to be supported currently?

EDIT: Added ingress config:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: XXX
  namespace: XXX
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
    kubernetes.io/ingress.global-static-ip-name: XXX
    #ingress.kubernetes.io/enable-cors: "true"
    
spec:
  tls:
  - hosts:
    - 'XXX'
    secretName: tls-secret
  rules:
  - host: XXX
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: XXX
            port:
              number: 80
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: XXX
            port:
              number: 80
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This is a response from the Google Load Balancer, which is configured the the GKE Ingress resource. I don't think that this can be configured in a way that it accepts that request.

You might try using another Ingress controller that doesn't reject such malformed requests.

See also Google compute load balancer throws 400 Bad Request on DELETE

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!