I use Traefik 1.7 in a Oracle K8s cluster. For this test I used an internal loadbalancer.
When I use only http Traefik works fine. I can access my service. The problem is when I try to use https an http-redirect.
For my test I generated self signed certificates.
My ingress looks like:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: kubia-ingress labels: app: kubia annotations: kubernetes.io/ingress.class: traefik spec: defaultBackend: service: name: kubia port: number: 80 rules: - host: xxx.yyy.org http: paths: - path: / pathType: Prefix backend: service: name: kubia port: number: 80
I can access my k8s service without traefik.
But when I call it via curl and traefik-controller I see the following in the log:
- For "curl http://xxx.yyy.org"
10.244.0.0 - - [22/Mar/2021:08:28:54 +0000] "GET / HTTP/1.1" 302 5 "-" "curl/7.61.1" 7 "entrypoint redirect for http" "/" 0ms
And the answer is "Found":
- When I call with https: "curl --insecure https://xxx.yyy.org/"
I see in the traefik-logs
10.244.0.0 - - [22/Mar/2021:08:31:14 +0000] "GET / HTTP/2.0" 404 19 "-" "curl/7.61.1" 10 "backend not found" "/" 0ms
However the service is existing and I can call it successful from with K8s.
$:~/traefik_certs$ k describe ingress kubia-ingress Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress Name: kubia-ingress Namespace: default Address: Default backend: kubia:80 (10.244.0.133:8080,10.244.0.7:8080,10.244.1.6:8080) Rules: Host Path Backends ---- ---- -------- xxx.yyy.org / kubia:80 (10.244.0.133:8080,10.244.0.7:8080,10.244.1.6:8080) Annotations: kubernetes.io/ingress.class: traefik Events: <none>
What is wrong? Any hint? I would really like to solve this http-redirect-problem.