Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error creating ingress path with GCE + ExternalName

I have an ExternalName service:

apiVersion: v1
kind: Service
metadata:
  name: external
  namespace: default
spec:
  externalName: my-site.com
  ports:
  - port: 443
    protocol: TCP
    targetPort: 443
  type: ExternalName

And an Ingress path:

spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: external
          servicePort: 443
        path: /*

But saving the ingress returns:

Error during sync: error while evaluating the ingress spec: service "default/external" is type "ExternalName", expected "NodePort" or "LoadBalancer"

GCE ingress should support ExternalName services (or at least there isn't easily findable documentation suggesting otherwise) and that error is hard to track down.

like image 880
hyperbell Avatar asked Nov 01 '18 18:11

hyperbell


1 Answers

GCE ingresses do not support type: ExternalName due to the fact that they use GCE LB as the providing infrastructure. the GCE LB can't use it as a backend.

I recommend posting this as a Feature Request on Google's Issue tracker

like image 185
Patrick W Avatar answered Nov 05 '22 21:11

Patrick W