Skip to content

Kubernetes - Undefined backend  #710

@valentin2105

Description

@valentin2105

Hi,

I'm trying deploy Traefik (v1.0.3) in my Kubernetes cluster (GitVersion:"v1.3.6").

I have two deployments running : Wordpress and Flask (each on port 80).

My problem is :

Traefik only work with my wordpress deployment but give me an "Undefined Backend" for my Flask deployment. I use the same Deployment/SVC/Ingress pattern for my two deployments.

Here is some logs & configuration files :

WP-svc :

apiVersion: v1
kind: Service
metadata:
  labels:
    run: wp
  name: wp
  namespace: default
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    run: wp
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

WP-Ingress :

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: wp
spec:
  rules:
  - host: wp.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: wp
          servicePort: http

Flask-svc :

apiVersion: v1
kind: Service
metadata:
  labels:
    run: flask
  name: flask
  namespace: default
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    run: flask
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

Flask-Ingress :

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: flask
spec:
  rules:
  - host: flask.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: flask
          servicePort: http

⚠️ Each SVC work fine when I reach each service IP.

Here is the Traefik's logs for WP :

time="2016-10-02T22:37:20Z" level=debug msg="Creating frontend wp.example.com/"
time="2016-10-02T22:37:20Z" level=debug msg="Wiring frontend wp.example.com/ to entryPoint http"
time="2016-10-02T22:37:20Z" level=debug msg="Creating route wp.example.com Host:wp.example.com"
time="2016-10-02T22:37:20Z" level=debug msg="Creating route / PathPrefix:/"
time="2016-10-02T22:37:20Z" level=debug msg="Creating backend wp.example.com/"
time="2016-10-02T22:37:20Z" level=debug msg="Creating load-balancer wrr"
time="2016-10-02T22:37:20Z" level=debug msg="Creating server http://10.200.1.x:80 at http://10.200.1.10:80 with weight 1"
time="2016-10-02T22:37:20Z" level=debug msg="Creating server http://10.200.1.x:80 at http://10.200.1.13:80 with weight 1"
time="2016-10-02T22:37:20Z" level=info msg="Server configuration reloaded on :80"

Here is the Traefik's logs for Flask :

time="2016-10-02T22:25:02Z" level=debug msg="Creating frontend flask.example.com/"
time="2016-10-02T22:25:02Z" level=debug msg="Wiring frontend flask.example.com/ to entryPoint http"
time="2016-10-02T22:25:02Z" level=debug msg="Creating route / PathPrefix:/"
time="2016-10-02T22:25:02Z" level=debug msg="Creating route flask.example.com Host:flask.example.com"
time="2016-10-02T22:25:02Z" level=debug msg="Creating backend flask.example.com/"
time="2016-10-02T22:25:02Z" level=error msg="Undefined backend 'flask.example.com/' for frontend flask.example.com/"
time="2016-10-02T22:25:02Z" level=error msg="Skipping frontend flask.example.com/..."

It's look like "Flask" svc is unavailable but I can reach my service in Kuber's API :

/api/v1/namespaces/default/services/flask --> Work fine.

Can you help me ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions