{"action":"created","issue":{"url":"https://api.github.com/repos/containous/traefik/issues/410","repository_url":"https://api.github.com/repos/containous/traefik","labels_url":"https://api.github.com/repos/containous/traefik/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/containous/traefik/issues/410/comments","events_url":"https://api.github.com/repos/containous/traefik/issues/410/events","html_url":"https://github.com/containous/traefik/issues/410","id":156869116,"number":410,"title":"Kubernetes backend configuration is unclear","user":{"login":"jimmycuadra","id":122457,"avatar_url":"https://avatars.githubusercontent.com/u/122457?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmycuadra","html_url":"https://github.com/jimmycuadra","followers_url":"https://api.github.com/users/jimmycuadra/followers","following_url":"https://api.github.com/users/jimmycuadra/following{/other_user}","gists_url":"https://api.github.com/users/jimmycuadra/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmycuadra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmycuadra/subscriptions","organizations_url":"https://api.github.com/users/jimmycuadra/orgs","repos_url":"https://api.github.com/users/jimmycuadra/repos","events_url":"https://api.github.com/users/jimmycuadra/events{/privacy}","received_events_url":"https://api.github.com/users/jimmycuadra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-25T23:00:50Z","updated_at":"2016-05-27T17:52:09Z","closed_at":null,"body":"I'm trying to use Traefik as a Kubernetes ingress controller, but I'm getting an error and I am not able to figure out what might be wrong with my configuration from the Traefik documentation.\r\n\r\nAny help figuring out the issue here or improved documentation about the expected configuration for all these various resources would be much appreciated! Let me know if there's other information I can provide to help diagnose.\r\n\r\nTraefik version: v1.0.0-beta.704 (via official Docker image)\r\nTraefik itself is running in the default Kubernetes namespace.\r\n\r\nThe error appearing in Traefik's logs is:\r\n\r\n```\r\ntime=\"2016-05-25T21:51:09Z\" level=error msg=\"Error loading new configuration, aborted Undefined backend: foo.example.com\"\r\n```\r\n\r\nHere's the full log with debug logging enabled: https://gist.github.com/jimmycuadra/9a5ef319796d6b1dc73a401946b07a4a\r\n\r\ntraefik.toml:\r\n\r\n``` toml\r\ndefaultEntryPoints = [\"http\", \"https\"]\r\n\r\n[entryPoints]\r\n\r\n[entryPoints.http]\r\naddress = \":80\"\r\n\r\n[entryPoints.http.redirect]\r\nentryPoint = \"https\"\r\n\r\n[entryPoints.https]\r\naddress = \":443\"\r\n\r\n[entryPoints.https.tls]\r\n\r\n[[entryPoints.https.tls.certificates]]\r\nCertFile = \"/etc/ssl/cert.pem\"\r\nKeyFile = \"/etc/ssl/key.pem\"\r\n\r\n[kubernetes]\r\n\r\n[web]\r\naddress = \":8080\"\r\nReadOnly = true\r\n```\r\n\r\nI also tried setting kubernetes.namespaces to an empty array, since from looking at the code it seems it will read ingresses from all namespaces if and only if that array is empty. But again, the documentation doesn't explain this so I'm not totally sure. In either case, both the default value and an empty array produce the same error.\r\n\r\nThe ingress resource I'm attempting to fulfill:\r\n\r\n``` yaml\r\napiVersion: extensions/v1beta1\r\nkind: Ingress\r\nmetadata:\r\n  creationTimestamp: 2016-05-25T00:44:03Z\r\n  generation: 1\r\n  name: foo\r\n  namespace: foo\r\n  resourceVersion: \"1122189\"\r\n  selfLink: /apis/extensions/v1beta1/namespaces/foo/ingresses/foo\r\n  uid: c7861949-2211-11e6-a0d7-064f66afdabf\r\nspec:\r\n  rules:\r\n  - host: foo.example.com\r\n    http:\r\n      paths:\r\n      - backend:\r\n          serviceName: foo\r\n          servicePort: http\r\nstatus:\r\n  loadBalancer: {}\r\n```\r\n\r\nThe service it points to:\r\n\r\n``` yaml\r\napiVersion: v1\r\nkind: Service\r\nmetadata:\r\n  creationTimestamp: 2016-05-25T00:44:03Z\r\n  name: foo\r\n  namespace: foo\r\n  resourceVersion: \"1122187\"\r\n  selfLink: /api/v1/namespaces/foo/services/foo\r\n  uid: c756d03b-2211-11e6-a0d7-064f66afdabf\r\nspec:\r\n  clusterIP: 10.3.0.241\r\n  ports:\r\n  - name: http\r\n    port: 80\r\n    protocol: TCP\r\n    targetPort: http\r\n  selector:\r\n    app: foo\r\n  sessionAffinity: None\r\n  type: ClusterIP\r\nstatus:\r\n  loadBalancer: {}\r\n```"},"comment":{"url":"https://api.github.com/repos/containous/traefik/issues/comments/222211575","html_url":"https://github.com/containous/traefik/issues/410#issuecomment-222211575","issue_url":"https://api.github.com/repos/containous/traefik/issues/410","id":222211575,"user":{"login":"ekozan","id":688184,"avatar_url":"https://avatars.githubusercontent.com/u/688184?v=3","gravatar_id":"","url":"https://api.github.com/users/ekozan","html_url":"https://github.com/ekozan","followers_url":"https://api.github.com/users/ekozan/followers","following_url":"https://api.github.com/users/ekozan/following{/other_user}","gists_url":"https://api.github.com/users/ekozan/gists{/gist_id}","starred_url":"https://api.github.com/users/ekozan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekozan/subscriptions","organizations_url":"https://api.github.com/users/ekozan/orgs","repos_url":"https://api.github.com/users/ekozan/repos","events_url":"https://api.github.com/users/ekozan/events{/privacy}","received_events_url":"https://api.github.com/users/ekozan/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T17:52:09Z","updated_at":"2016-05-27T17:52:09Z","body":"using text on `servicePort: ` is just not compilant with the spec ( in 1.2 )\r\n\r\n`A backend is a service:port combination as described in the services doc.`\r\n\r\n```go\r\ntype ServicePort struct {\r\n\t// The name of this port within the service. This must be a DNS_LABEL.\r\n\t// All ports within a ServiceSpec must have unique names. This maps to\r\n\t// the 'Name' field in EndpointPort objects.\r\n\t// Optional if only one ServicePort is defined on this service.\r\n\tName string `json:\"name,omitempty\" protobuf:\"bytes,1,opt,name=name\"`\r\n\r\n\t// The IP protocol for this port. Supports \"TCP\" and \"UDP\".\r\n\t// Default is TCP.\r\n\tProtocol Protocol `json:\"protocol,omitempty\" protobuf:\"bytes,2,opt,name=protocol,casttype=Protocol\"`\r\n\r\n\t// The port that will be exposed by this service.\r\n\tPort int32 `json:\"port\" protobuf:\"varint,3,opt,name=port\"`\r\n\r\n\t// Number or name of the port to access on the pods targeted by the service.\r\n\t// Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.\r\n\t// If this is a string, it will be looked up as a named port in the\r\n\t// target Pod's container ports. If this is not specified, the value\r\n\t// of the 'port' field is used (an identity map).\r\n\t// This field is ignored for services with clusterIP=None, and should be\r\n\t// omitted or set equal to the 'port' field.\r\n\t// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#defining-a-service\r\n\tTargetPort intstr.IntOrString `json:\"targetPort,omitempty\" protobuf:\"bytes,4,opt,name=targetPort\"`\r\n\r\n\t// The port on each node on which this service is exposed when type=NodePort or LoadBalancer.\r\n\t// Usually assigned by the system. If specified, it will be allocated to the service\r\n\t// if unused or else creation of the service will fail.\r\n\t// Default is to auto-allocate a port if the ServiceType of this Service requires one.\r\n\t// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport\r\n\tNodePort int32 `json:\"nodePort,omitempty\" protobuf:\"varint,5,opt,name=nodePort\"`\r\n}\r\n\r\n```\r\n\r\nbut actually it's work but dont know if it's normal ^^\r\n\r\n```go\r\ntype IngressBackend struct {\r\n\t// Specifies the name of the referenced service.\r\n\tServiceName string `json:\"serviceName\"`\r\n\r\n\t// Specifies the port of the referenced service.\r\n\tServicePort intstr.IntOrString `json:\"servicePort\"`\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"ekozan"}}