Error creating ingress path with GCE + ExternalName

11/1/2018

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.

-- hyperbell
google-kubernetes-engine
kubernetes-ingress

1 Answer

11/2/2018

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

-- Patrick W
Source: StackOverflow