0

I am trying to make my K8S GKE Service to work with port :80 using this configuration:

apiVersion: v1
kind: Service
metadata:
  name: external-{{ .Release.Name }}
  labels:
    {{- include "release_labels" . | indent 4 }}
spec:
  type: LoadBalancer
  loadBalancerIP: 34.90.xx.xx
  ports:
  - name: proxy
    port: 80
    targetPort: 8080
    protocol: TCP
  selector:
    {{- include "release_labels" . | indent 4 }}

This is a HTTP proxy service.

The above configuration works with curl --proxy 34.90.xx.xx:80 gajus.com, but it does not work when port is not specified, i.e. curl --proxy 34.90.xx.xx gajus.com.

What is missing to make curl --proxy 34.90.xx.xx gajus.com work?

Gajus
  • 831
  • 5
  • 15
  • 27

1 Answers1

1

The answer can be found in curl man page:

   -x, --proxy [protocol://]host[:port]
          Use the specified proxy.
[...]

          If the port number is not specified in the proxy string, it
          is assumed to be 1080.

Didn't you mean to try something like:

curl --header 'Host: fqdn.example.com' http;//1.2.3.4
SYN
  • 1,751
  • 8
  • 14