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

Traefik does not update the kubernetes ingress status or address #3377

Closed
r0fls opened this issue May 23, 2018 · 7 comments
Closed

Traefik does not update the kubernetes ingress status or address #3377

r0fls opened this issue May 23, 2018 · 7 comments

Comments

@r0fls
Copy link

r0fls commented May 23, 2018

Bug

What did you do?

I deployed the [stable/traefik] helm chart to a 1.8.9 kubernetes cluster in AWS. I added the annotation service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 to the resulting traefik service, so that it creates an external load balancer (this may not be needed in your cluster). I then deployed a basic hello world deployment/svc/ingress with the traefik ingress class set. If I manually retrieve the hostname of the traefik service ELB, kubectl get svc traefik-test -o yaml | grep -A 3 status (assuming the deployment was named traefik-test), then curl it with the host header set to my ingress hostname, then I see the hello world app:

curl -H "Host: hello-word-test.cluster-adminsitered-domain.example.com" internal-a7e28d2a05ebd11e8ae62129f627ab16-1418276853.us-east-1.elb.amazonaws.com
hello world

So, things work up to there.

What did you expect to see?

Status of my ingress should be filled in with the ELB from the traefik controller. For example, a similar ingress fulfilled by the nginx ingress controller shows:

status:
  loadBalancer:
    ingress:
    - hostname: internal-a82f61a2b549411e8a3c60246d84323b-1415175647.us-east-1.elb.amazonaws.com

What did you see instead?

Traefik does not set the ingress status of the fulfilled ingress, or address (a field in kubectl get ing <INGRESS_NAME>), which means it won't play nicely with things like external-dns:

kubectl get ing  hello-world-test -o yaml | grep status -A 3
status:
  loadBalancer: {}

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

I tried the version specified in the [stable/traefik] helm chart (1.5.4) and the latest recommended version by traefik, 1.6.2.

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

I'm using the [stable/traefik] controller with no relevant modifications. The only modification was the one made to the service annotations.

@dtomcej
Copy link
Contributor

dtomcej commented May 24, 2018

Hello @r0fls!

Thank you so much for your interest in traefik!

The functionality of traefik to update ingress status was added via #3324. This feature will be available on traefik version 1.7.

If you want to try out the feature with an experimental build, you can use the containous/traefik:experimental image, which is built off the master branch. Please note that this experimental build is not considered stable enough for production use.

Thanks!

@micw
Copy link

micw commented Jan 15, 2019

@dtomcej Looks that one piece is missing in your change. The RBAC needs to be extended to update the ingress.

https://github.com/containous/traefik/blob/master/examples/k8s/traefik-rbac.yaml needs:

  - apiGroups:
      - extensions
    resources:
      - ingresses/status
    verbs:
      - update

@rbq
Copy link
Contributor

rbq commented Jan 15, 2019

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: traefik-ingress-controller
rules:
  [...]
  - apiGroups:
    - extensions
    resources:
    - ingresses/status
    verbs:
    - update

@micw
Copy link

micw commented Jan 15, 2019

Thx, markdown ate my yaml ;)

traefiker pushed a commit to rbq/traefik that referenced this issue Jan 15, 2019
The example ClusterRole needs to updated for Træfik 1.7 to allow updating the status after successfully provisioning the Ingress. /closes traefik#3377

(cherry picked from commit 99fa7c7729c9e99545fb12f3cf80785a17096cdc)
@traefiker traefiker added this to the 1.7 milestone Jan 15, 2019
@traefiker
Copy link
Contributor

Closed by #4397.

@jralph

This comment has been minimized.

@jralph
Copy link

jralph commented Jul 30, 2019

Just got this working now.

For anyone else wondering, you need to use the command line arguments (or equivalent config settings) to get this working.

--kubernetes.ingressendpoint
--kubernetes.ingressendpoint.publishedservice=namespace/traefik-ingress-service

@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

7 participants