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

448
Vistas
Network Load Balancer con NGINX Ingress Controller en Amazon EKS siempre devuelve un error 503

Todos los archivos a los que se hace referencia se incluyen a continuación. Estoy tratando de crear un proxy NGINX para servir mi back-end y front-end con el mismo dominio.

Nginx se ejecuta correctamente, puedo decirlo porque recibo un error 404 de nginx cuando presiono la URL raíz proporcionada por kubectl get ingress .

Sin embargo, cuando llego al punto final url/hello , recibo un error 503 Service Temporarily Unavailable de Nginx.

¿Alguien ha encontrado este error?

Aquí está el archivo yaml para mi kubectl create -f :

 kind: Service apiVersion: v1 metadata: name: ingress-nginx namespace: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx annotations: # by default the type is elb (classic load balancer). service.beta.kubernetes.io/aws-load-balancer-type: nlb spec: # this setting is to make sure the source IP address is preserved. externalTrafficPolicy: Local type: LoadBalancer selector: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx ports: - name: http port: 80 targetPort: http # - name: https # port: 443 # targetPort: https --- kind: Ingress apiVersion: networking.k8s.io/v1beta1 metadata: name: test-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /hello backend: serviceName: go-hello servicePort: 8080 --- kind: Pod apiVersion: v1 metadata: name: go-hello labels: app: go-hello spec: containers: - name: go-hello image: docker.io/chsclarke11/test-go --- kind: Service apiVersion: v1 metadata: name: go-hello-service spec: selector: app: go-hello ports: - port: 8080 # Default port for image

aquí está el Dockerfile para la aplicación go-hello:

 FROM golang:1.12-alpine RUN apk add --no-cache git # Set the Current Working Directory inside the container WORKDIR /app RUN go mod download COPY . . # Build the Go app RUN go build -o main # This container exposes port 8080 to the outside world EXPOSE 8080 # Run the binary program produced by `go install` CMD ["./main"]

Aquí está la aplicación simulada go-hello:

 package main import ( "fmt" "net/http" ) func main() { fmt.Printf("starting server at http://localhost:8080") http.HandleFunc("/", HelloServer) http.ListenAndServe(":8080", nil) } func HelloServer(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, %s!", r.URL.Path[1:]) }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

En la definición de Ingress , especificó un nombre de servicio de backend incorrecto: go-hello que no es compatible con el nombre de servicio que creó para backend - go o-hello-service .

También para el futuro, puede obtener un error 503 de nginx cuando basic-auth está habilitada en Ingress y la anotación nginx.ingress.kubernetes.io/auth-secret hace referencia a un secreto que no existe.

También puede agregar el secreto que falta o eliminar todas las anotaciones de basic-auth del Ingress para resolver esta situación.

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