Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

628
Vistas
Kubectl proxy behind NGINX: invalid upgrade response

I'm trying to add a local Kubernates cluster to my GitLab group for CI/CD deployments. I've started with running the following command:

kubectl proxy --address 0.0.0.0 --accept-hosts '.*'

I've tested it executing curl http://localhost:8001/api and running curl http://192.168.1.2:8001/api from another machine in the same network. Proxy was available in my local network.

The next step was to make the proxy available on the internet behind kubernates.example.com. For that I've configured NGINX as the following:

server {
    server_name kubernates.example.com;
    listen 443 ssl;
    listen 80;

    include ssl_standart_conf;

    location / {
        proxy_pass http://192.168.1.2:8001/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Executing curl https://kubernates.example.com/api returned the following error:

invalid upgrade response: status code 200

Kubernates proxy logs

E0225 22:33:50.944018 1642369 upgradeaware.go:312] Proxy upgrade error: invalid upgrade response: status code 200
E0225 22:33:50.944060 1642369 proxy_server.go:144] Error while proxying request: invalid upgrade response: status code 200
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Okay, I've managed to resolve the issue. The following nginx configuration made a trick

server {
    server_name kubernates.example.com;
    listen 443 ssl;
    listen 80;

    include ssl_standart_conf;

    location / {
        proxy_pass http://192.168.1.2:8001/;
        proxy_set_header Host $host;
    }
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda