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

problem: ingress health check always be processing #968

Closed
k8sedu opened this issue Jan 2, 2019 · 14 comments
Closed

problem: ingress health check always be processing #968

k8sedu opened this issue Jan 2, 2019 · 14 comments

Comments

@k8sedu
Copy link

k8sedu commented Jan 2, 2019

when i use traefik as ingress controller, it whill not update status.loadbalancer field, so as to argo-cd, the ingress object will be processing.See traefik/traefik#3377, they will fix it.
can we change the method for ingress health check, or expose it as a config

@k8sedu
Copy link
Author

k8sedu commented Jan 2, 2019

when use traefik as ingress controller, field u check is as below:

  "status": {
    "loadBalancer": {}
  }

@alexmt
Copy link
Collaborator

alexmt commented Jan 2, 2019

Custom health checks are not yet supported but we plan to work on it in next release. #911

@k8sedu
Copy link
Author

k8sedu commented Jan 2, 2019

but
ty. could u add one config that it can be skipped since that different ingress controllers make different behaviors

@jessesuen
Copy link
Member

@k8sedu according to traefik/traefik#3377, it seems the v1.7.X of Traefik (which is already released), supports this.

Since the current version of Traefik has the desired behavior, I don't see the benefit of adding this, especially since the custom health assessment feature would immediately obsolete the config setting we add.

@jessesuen
Copy link
Member

For the record, Heptio's Contour ingress controller suffers the same problem:
projectcontour/contour#403

@k8sedu
Copy link
Author

k8sedu commented Jan 3, 2019

@k8sedu according to containous/traefik#3377, it seems the v1.7.X of Traefik (which is already released), supports this.

Since the current version of Traefik has the desired behavior, I don't see the benefit of adding this, especially since the custom health assessment feature would immediately obsolete the config setting we add.

my installed traefik 1.7.6 has not worked correctly. that field is empty.

@jessesuen
Copy link
Member

@k8sedu this appears to be an option that needs to configured. See:

https://docs.traefik.io/configuration/backends/kubernetes/

I think you need to use publishedService field:

# Enable IngressEndpoint configuration.
# This will allow Traefik to update the status section of ingress objects, if desired.
#
# Optional
#
# [kubernetes.ingressEndpoint]
#
# At least one must be configured.
# `publishedservice` will override the `hostname` and `ip` settings if configured.
#
# hostname = "localhost"
# ip = "127.0.0.1"
# publishedService = "namespace/servicename"

@ermazi
Copy link

ermazi commented Jan 3, 2019

@jessesuen ty

@ermazi
Copy link

ermazi commented Jan 3, 2019

it worked.but there are some wrong with traefik doc about this.:D
official config omitting rbac update~

step1. add config

    [kubernetes]
      [kubernetes.ingressEndpoint]
        hostname = "traefik"

step2. update clusterrole

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: traefik-ingress-controller
rules:
- apiGroups:
  - ""
  resources:
  - services
  - endpoints
  - secrets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - ingresses
  - ingresses/status
  verbs:
  - get
  - list
  - watch
  - update

@enys
Copy link

enys commented Aug 24, 2021

for anyone arriving here, the link is now : https://doc.traefik.io/traefik/providers/kubernetes-ingress/#publishedservice

@0dragosh
Copy link

0dragosh commented Nov 1, 2021

If anyone encounters this with Traefik ingress controller deployed via Helm, here's the values.yaml to fix it, at least for v10.6.0:

providers:
  kubernetesIngress:
    publishedService:
      enabled: true

@mickkael
Copy link
Contributor

it worked.but there are some wrong with traefik doc about this.:D official config omitting rbac update~

step1. add config

    [kubernetes]
      [kubernetes.ingressEndpoint]
        hostname = "traefik"

step2. update clusterrole

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: traefik-ingress-controller
rules:
- apiGroups:
  - ""
  resources:
  - services
  - endpoints
  - secrets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - ingresses
  - ingresses/status
  verbs:
  - get
  - list
  - watch
  - update

the apiGroups must now include networking.k8s.io

  • apiGroups:
    • extensions
    • networking.k8s.io

@yacine-1
Copy link

for Traefik users, if the "publishedService" option didn't work, just add the following annotation to your deployment:
--providers.kubernetesingress.ingressendpoint.ip=<your LB ip>

clempat added a commit to clempat/home-ops that referenced this issue Jan 26, 2023
clempat added a commit to clempat/home-ops that referenced this issue Jan 26, 2023
BlueNc added a commit to BlueNc/vke-fch that referenced this issue May 30, 2023
@davisoares454
Copy link

davisoares454 commented Aug 11, 2023

For me, what worked was to put this as a new arg on my Traefik container on its deloyment:

--providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik

It then updated every ingresses controlled by it with a loadbalancer status with the right value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants