Hello, I'm trying to setup traefik v1.7.30 ingress as service but I always get the error 404.
I would use only port 80, no certificate yet, no separated domains.
The services are all reachable from the nodes with curl but via traefik always threw a 404 error. The traefik dashboard looks working, all paths are blue. No red
kubernetes version: 1.6
My installation details are here.
kind: Deployment
apiVersion: apps/v1
metadata:
name: traefik-ingress-controller
namespace: default
labels:
k8s-app: traefik-ingress-lb
spec:
replicas: 1
selector:
matchLabels:
k8s-app: traefik-ingress-lb
template:
metadata:
labels:
k8s-app: traefik-ingress-lb
name: traefik-ingress-lb
spec:
serviceAccountName: traefik-ingress-controller
terminationGracePeriodSeconds: 60
containers:
- image: traefik:v1.7.30
name: traefik-ingress-lb
ports:
- name: http
containerPort: 80
- name: admin
containerPort: 8080
args:
- --api
- --kubernetes
- --logLevel=DEBUG
---
kind: Service
apiVersion: v1
metadata:
name: traefik-ingress-service
namespace: default
annotations:
metallb.universe.tf/address-pool: mmas-ip-space
spec:
selector:
k8s-app: traefik-ingress-lb
ports:
- protocol: TCP
port: 80
name: web
- protocol: TCP
port: 8080
name: admin
type: LoadBalancer
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: webmust-ing
namespace: default
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- http:
paths:
- path: /tpath
backend:
serviceName: webmust-service
servicePort: 80
- path: /helloservice
backend:
serviceName: hellok8s-service
servicePort: 8080
- path: /nginx
backend:
serviceName: test-ngnix-service
servicePort: 80
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hellok8s-service ClusterIP 10.100.168.2 <none> 8080/TCP 5d21h
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 133d
test-ngnix-service ClusterIP 10.100.173.151 <none> 80/TCP 11h
traefik-ingress-service LoadBalancer 10.102.169.227 10.24.33.32 80:30887/TCP,8080:30463/TCP 17h
webmust-service ClusterIP 10.101.186.125 <none> 80/TCP 10h
Logs from traefik
time="2021-05-27T07:34:17Z" level=debug msg="vulcand/oxy/forward/http: Round trip: http://10.23.37.21:8080, code: 404, Length: 0, duration: 2.157719ms"
time="2021-05-27T07:34:17Z" level=debug msg="vulcand/oxy/forward/http: completed ServeHttp on request" Request="{\"Method\":\"HEAD\",\"URL\":{\"Scheme\":\"http\",\"Opaque\":\"\",\"User\":null,\"Host\":\"10.23.37.21:8080\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"Proto\":\"HTTP/1.1\",\"ProtoMajor\":1,\"ProtoMinor\":1,\"Header\":{\"Accept\":[\"*/*\"],\"User-Agent\":[\"curl/7.29.0\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"10.24.33.32\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"10.23.37.0:40790\",\"RequestURI\":\"/tpath/webclient-ares\",\"TLS\":null}"
time="2021-05-27T07:34:17Z" level=debug msg="vulcand/oxy/forward: completed ServeHttp on request" Request="{\"Method\":\"HEAD\",\"URL\":{\"Scheme\":\"http\",\"Opaque\":\"\",\"User\":null,\"Host\":\"10.23.37.21:8080\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"Proto\":\"HTTP/1.1\",\"ProtoMajor\":1,\"ProtoMinor\":1,\"Header\":{\"Accept\":[\"*/*\"],\"User-Agent\":[\"curl/7.29.0\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"10.24.33.32\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"10.23.37.0:40790\",\"RequestURI\":\"/tpath/webclient-ares\",\"TLS\":null}"
time="2021-05-27T07:34:17Z" level=debug msg="vulcand/oxy/roundrobin/rr: completed ServeHttp on request" Request="{\"Method\":\"HEAD\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/tpath/webclient-ares\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"Proto\":\"HTTP/1.1\",\"ProtoMajor\":1,\"ProtoMinor\":1,\"Header\":{\"Accept\":[\"*/*\"],\"User-Agent\":[\"curl/7.29.0\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"10.24.33.32\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"10.23.37.0:40790\",\"RequestURI\":\"/tpath/webclient-ares\",\"TLS\":null}"
kubectl describe pod webmust-deployment-76c9949499-lcmsd | grep IP
IP: 10.23.37.21
But /webclient-ares/ path should response with the login page. I tested with NodePort service it works and the ClusterIP service also response with http 200 to curl. I guess something is missing from my traefik config