Cannot create service: subset not found"

9/2/2020

I have set up traefik with the helm chart. I have an application that I want visible to the outside world. But I am getting this error below.

kind: Ingress
apiVersion: networking.k8s.io/v1beta1
metadata:
  namespace: example
  name: example-ingress
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: web, websecure
spec:
  rules:
  - host: mydomain.com
    http:
      paths:
      - path: /
        backend:
          serviceName: example-app
          servicePort: 80

I can then run:

kubectl get ing -n example

which gives me:

NAMESPACE   NAME              CLASS    HOSTS                       ADDRESS   PORTS   AGE
example     example-ingress   <none>   mydomain.com             80      75m

But when I check the logs of the traefik pod I get the following errors:

level=error msg="Cannot create service: subset not found" namespace=example ingress=example-ingress serviceName=example-app providerName=kubernetes servicePort=80

Any ideas?

-- Jacob
kubernetes
traefik
traefik-ingress

1 Answer

9/2/2020

Please try solution from thread below, answer says:

"I had a missing SecretName in my ingress definition, and i updated ro -rc3 (and finally to v2.0), after the update the error is no longer there"

https://community.containo.us/t/kubernetesingress-cannot-create-service-subset-not-found/1516

-- Roar S.
Source: StackOverflow