问题标签 [traefik-ingress]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1028 浏览

kubernetes - Traefik Dashboard - 自定义 API 路径

我可以将仪表板的 Traefik 的默认 api 路径更改为/api其他路径吗?不幸的是,我发现这个链接不再起作用了。

Traefik 在我的场景中充当 Kubernetes 入口控制器,我正在使用基于路径的路由。现在的问题是我不能/api用于我自己的微服务,因为仪表板已经使用了这个路径(这些端点)。

仪表板的入口配置:

微服务之一的入口配置:

0 投票
3 回答
1770 浏览

kubernetes - kubernetes expose services with Traefik 2.x as ingress with CRD

What do i have working

I have a Kubernetes cluster as follow:

  • Single control plane (but plan to extend to 3 control plane for HA)
  • 2 worker nodes



On this cluster i deployed (following this doc from traefik https://docs.traefik.io/user-guides/crd-acme/):

  • A deployment that create two pods :

    • traefik itself: which will be in charge of routing with exposed port 80, 8080
    • whoami:a simple http server thats responds to http requests
  • two services

    • traefik service:
    • whoami servic:
  • One traefik IngressRoute:

What do i want

I have multiple services running in the cluster and i want to expose them to the outside using Ingress. More precisely i want to use the new Traefik 2.x CDR ingress methods.

My ultimate goal is to use new traefiks 2.x CRD to expose resources on port 80, 443, 8080 using IngressRoute Custom resource definitions

What's the problem

If i understand well, classic Ingress controllers allow exposition of every ports we want to the outside world (including 80, 8080 and 443).

But with the new traefik CDR ingress approach on it's own it does not exports anything at all. One solution is to define the Traefik service as a loadbalancer typed service and then expose some ports. But you are forced to use the 30000-32767 ports range (same as nodeport), and i don't want to add a reverse proxy in front of the reverse proxy to be able to expose port 80 and 443...

Also i've seed from the doc of the new igress CRD (https://docs.traefik.io/user-guides/crd-acme/) that:

kubectl port-forward --address 0.0.0.0 service/traefik 8000:8000 8080:8080 443:4443 -n default

is required, and i understand that now. You need to map the host port to the service port. But mapping the ports that way feels clunky and counter intuitive. I don't want to have a part of the service description in a yaml and at the same time have to remember that i need to map port with kubectl.

I'm pretty sure there is a neat and simple solution to this problem, but i can't understand how to keep things simple. Do you guys have an experience in kubernetes with the new traefik 2.x CRD config?

0 投票
2 回答
490 浏览

kubernetes - 如何为 Kubernetes 设置 Ingress 控制器,其中一个端点用于测试环境,另一个端点用于生产环境?

我正在 Kubernetes 的 deployment.yaml 中为我的服务设置 Ingress 控制器。

如何设置 Ingress 控制器,以便 QA pod 中的流量路由到 QA 端点,Prod prods 的流量路由到 Prod pod?

0 投票
0 回答
284 浏览

grpc - 如何为 AKS 配置 Traefik 以在 AKS 上使用 GRPC 服务?

我在 AKS 上安装了 traefik,但我不太了解如何在K8s 上为 GRPC 配置 Traefik 以进行反向代理和动态路由

0 投票
1 回答
3542 浏览

traefik-ingress - 对于 k3s 中的 Traefik Ingress Controller,禁用 TLS 验证

我正在使用 k3s 的默认安装(版本 v1.17.0+k3s.1)并验证它在我的 Raspberry Pi 集群上正常工作。

使用推荐的说明( https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ )安装 kubernetes-dashboard后,我在使用 k3s 将它暴露在集群之外后确认了它的工作原理基于 traefik 的负载均衡器。

但是,当我尝试使用 traefik 入口控制器公开它时,我无法连接到 kubernetes 仪表板,浏览器显示 HTTP 500 错误,即内部服务器错误。下面是我的入口 yaml 和 kubernetes-dashboard pod 日志,显示 TLS 证书错误。我相信证书错误是由于 traefik 不知道(和信任)kubernetes 仪表板使用的 TLS 证书。

一个。k8s-仪表板-入口

笔记。域“k8s-services”域是在我的 pi 集群机器和浏览计算机主机文件中定义的。

湾。Kubernetes 仪表板 pod 日志

我的问题似乎与以下 Stack Overflow 问题非常相似: Kubernetes dashboard through Ingress

我第一次尝试解决这个问题是将“ssl.insecureSkipVerify:'true'”添加到 k3s 中的 traefik.toml 文件中。不幸的是,我找不到全局 traefik.toml 文件(并且 traefik 似乎是使用 Helm Chart 安装的)。

请让我知道如何更新 traefik 中的“ssl.insecureSkipVerify”设置或其他替代解决方案。

0 投票
1 回答
1454 浏览

ssl - 使用 Traefik / K8s 安装 2 个自定义 TLS 证书

我有一个运行良好的 K8s 集群,其域具有自定义 SSL 证书,所有其他子域都使用 Let's encrypt 通配符。

现在,我想添加另一个将使用自定义 SSL 证书的域,但它似乎不起作用。

.crt首先,我使用和.key文件创建一个 configMap

然后我添加我的证书traefik.toml

现在部署:

但是当我这样做时,有两个问题:

  • 我的新应用:https ://sge.company.fr使用通配符证书,而不是自定义证书(此操作的目的)
  • 使用自定义证书 api.crt 的应用程序(以前使用自定义 SSL 证书运行良好)没有使用通配符证书,这是一种回归。

我检查了traefik日志,似乎没有任何问题。

我也不明白,自定义 SSL 证书与域的链接在哪里。

谁能告诉我为什么会这样,我应该如何解决?

PD:我知道我应该使用秘密而不是 configMaps,但首先要做的是!

0 投票
0 回答
33 浏览

kubernetes - 是否可以使用 DNSchallenge 运行多个 Traefik v2 实例

让我们根据 traefik v2.1 文档进行加密,不可能有多个带有 ingressroutes 的 traefik CE 实例。

我了解 httpChallenge 的问题,但经过一些测试后 DNSchallenge 似乎可以工作。

有什么理由我不应该使用 DNSChallenge 并且可能也不起作用?

谢谢

0 投票
1 回答
1941 浏览

kubernetes - 为什么 Traefik v2 仅通过 http 响应 404

我的问题是我的 kubernetes 集群中的 traefik 入口控制器确实响应404 page not foundhttp但是我从服务中https得到了真正的响应。

这发生在我将 TLS 部分添加到IngressRoute.

这是我的 IngressRoute:

为什么我没有得到真实/相同的响应https

0 投票
1 回答
34 浏览

kubernetes - 为什么 taefik 不能代理到 kubernetes pod 服务

我想使用 taefik(v2.0) 将服务代理到 kubernetes(v1.15.2) 集群 pod,这是我的 taefik 配置:

我登录 taefik 管理仪表板并发现此错误:

我确信soa-red-envelope-servicepod 启动成功并在端口 11005 上侦听。当我将后端服务更改为 eureka 和 eureka 端口时,它工作正常。它说配置没问题,吊舱没问题,现在问题可能出在哪里?

0 投票
0 回答
596 浏览

kubernetes - 是否可以在 traefik 1.7 中设置具有速率限制的白名单

我将 traefik 与 k8s 一起使用。在文档中没有使用白名单的示例。速率限制文档