Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there plans to support the service type ExternalName in Kubernetes? #1142

Closed
regner opened this issue Feb 8, 2017 · 7 comments
Closed

Comments

@regner
Copy link
Contributor

regner commented Feb 8, 2017

What version of Traefik are you using (traefik version)?

traefik:v1.1.2

What is your environment & configuration (arguments, toml...)?

Kubernetes

# traefik.toml
defaultEntryPoints = ["http","https"]
[entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.http.redirect]
  entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]
[acme]
email = "[email protected]"
storageFile = "/acme/acme.json"
entryPoint = "https"
onDemand = true
onHostRule = true
[[acme.domains]]
main = "ctcpredatorfeed.ca"
[[acme.domains]]
main = "regnerba.com"

What did you do?

Point an ingress at a backend service that has a type of ExternalName.

apiVersion: v1
kind: Service
metadata:
  name: test
spec:
  ports:
  - name: https
    port: 443
  type: ExternalName
  externalName: something.regnerba.com  # Google Cloud Storage bucket
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
  name: test
spec:
  rules:
    - host: eve.regnerba.com
      http:
        paths:
          - path: /test
            backend:
              serviceName: test
              servicePort: https

What did you expect to see?

My hope was that Traefik would route requests to the external name

What did you see instead?

These errors:

time="2017-02-08T21:03:58Z" level=error msg="Error retrieving endpoints: failed to create endpoints request: GET \"https://10.3.240.1:443/api/v1/namespaces/default/endpoints/test\" : http error 404 GET \"https://10.3.240.1:443/api/v1/namespaces/default/endpoints/test\": \"{\\\"kind\\\":\\\"Status\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{},\\\"status\\\":\\\"Failure\\\",\\\"message\\\":\\\"endpoints \\\\\\\"test\\\\\\\" not found\\\",\\\"reason\\\":\\\"NotFound\\\",\\\"details\\\":{\\\"name\\\":\\\"test\\\",\\\"kind\\\":\\\"endpoints\\\"},\\\"code\\\":404}\\n\""

The errors make sense as I assume Traefik has no understanding that the ExternalName service type is a thing not hosted in the Kube cluster. Mostly just curious if this is something Traefik might potentially support in the future or if it is considered out side the scope of what Traefik is for.

@emilevauge
Copy link
Member

WDYT @errm @dtomcej ?

@regner
Copy link
Contributor Author

regner commented Feb 9, 2017

If you decide it is something that Traefik should support I would be willing to open the PR. Good excuse for me to finally touch some Go. Took a quick look at the code and it looks like it will basically just require adding an if block here.

@dtomcej
Copy link
Contributor

dtomcej commented Feb 9, 2017

@regner If you are willing to open a PR, we can definitely assist.

@errm
Copy link
Contributor

errm commented Feb 21, 2017

Should we also add support for externalIPs?

@regner
Copy link
Contributor Author

regner commented Feb 21, 2017

@errm The externalIp service type is for giving a kube service an external IP. I don't see a need to support that as it is just another way to access the service and traefik should be able to do that regardless as it looks at the service endpoints.

@errm
Copy link
Contributor

errm commented Feb 21, 2017

@regner right, I misread the documentation when looking up externalName. Ignore me :)

@regner
Copy link
Contributor Author

regner commented Feb 21, 2017

All good. :)

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants