我已经用舵图设置了traefik。我有一个想让外界看到的应用程序。但我在下面收到此错误。
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
然后我可以运行:
kubectl get ing -n example
这给了我
NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE
example example-ingress <none> mydomain.com 80 75m
但是当我检查traefik吊舱的日志时,出现以下错误:
level=error msg="Cannot create service: subset not found" namespace=example ingress=example-ingress serviceName=example-app providerName=kubernetes servicePort=80
有什么想法吗?
答案 0 :(得分:1)
请从下面的线程尝试解决方案,答案为:
“我的入口定义中缺少一个SecretName,并且我更新了ro -rc3(最后是v2.0),更新后错误不再存在”
https://community.containo.us/t/kubernetesingress-cannot-create-service-subset-not-found/1516