Closed felipefso closed 5 years ago
So the fact you got the yggdrasil status added to envoy indicates that the envoy-yggdrasil connection is working, so my next check would be whether yggdrasil is picking up your ingresses, a quick way to check is to have a look at yggdrasil's prometheus metrics, if you curl yggdrasil on port 8081/metrics you should see a metric of yggdrasil_ingresses which is how many ingresses it has found.
You can also turn on debug logging --debug
which may reveal more info
It's already in debug mode, I had paste the output above. Looking at /metrics endpoint, It has found 1 matching ingress object, but for some reason it is not generating the cluster for envoy:
# TYPE yggdrasil_cluster_updates counter
yggdrasil_cluster_updates 1
# HELP yggdrasil_clusters Total number of clusters generated
# TYPE yggdrasil_clusters gauge
yggdrasil_clusters 0
# HELP yggdrasil_ingresses Total number of matching ingress objects
# TYPE yggdrasil_ingresses gauge
yggdrasil_ingresses 1
# HELP yggdrasil_listener_updates Number of times the listener has been updated
# TYPE yggdrasil_listener_updates counter
yggdrasil_listener_updates 1
# HELP yggdrasil_virtual_hosts Total number of virtual hosts generated
# TYPE yggdrasil_virtual_hosts gauge
yggdrasil_virtual_hosts 0
Did you ever see this happens? What could be wrong considering this behavior?
So it has found the ingress object but it's failed to create any virtual hosts or clusters based off it,
can you show what you ingress object looks like? e.g kubectl get ingress my-ingress -o yaml
This is my ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.class":"traefik","traefik.ingress.kubernetes.io/frontend-entry-points":"http"},"name":"traefik-web-ui","namespace":"kube-system-custom"},"spec":{"rules":[{"host":"traefik.cluster1.preprod.com","http":{"paths":[{"backend":{"serviceName":"traefik","servicePort":"web"},"path":"/"}]}}]}}
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/frontend-entry-points: http
creationTimestamp: "2019-07-15T04:01:26Z"
generation: 1
name: traefik-web-ui
namespace: kube-system-custom
resourceVersion: "7291364"
selfLink: /apis/extensions/v1beta1/namespaces/kube-system-custom/ingresses/traefik-web-ui
uid: 37ba4ec6-a6b5-11e9-aa56-12311bc24cf8
spec:
rules:
- host: traefik.cluster1.preprod.com
http:
paths:
- backend:
serviceName: traefik
servicePort: web
path: /
status:
loadBalancer: {}
Ah your load balancer status is empty, this is where Yggdrasil finds the address that envoy should forward traffic to. This field is typically set by the ingress controller. Does traefik not work that way?
Oh man, Traefik don't write loadbalancer address/name by default, so I had to turn on with this two flags:
--kubernetes.ingressendpoint=true
--kubernetes.ingressendpoint.publishedservice=kube-system-custom/traefik-ingress-controller
Thanks, Joseph. Everything is working now.
I'm in the process of doing a PoC to evaluate if we're going to use this solution in our multi-cluster environment.
Envoy is not receiving k8s ingress configuration clusters/listeners from yggdrasil control-plane. I'm using the configuration reference:
Envoy docker container output:
yggdrasil docker container output:
yggdrasil.json config:
Envoy v1.10.0 config file:
I'm expecting to see traefik-ui cluster/listener but envoy can't get it by discovery, only yggdrasil/status was added.