Traefik

Path based routing issues Traefik as Ingress Controller

淺唱寂寞╮ 提交于 2019-12-21 06:25:10
问题 I'm running through what looks like a configuration issue! I am using traefik as ingress controller within kubernetes and I have an ingress to route some URLs to route some frontends to various backends. Let's say I have something like this: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test annotations: kubernetes.io/ingress.class: traefik traefik.frontend.rule.type: ReplacePathRegex spec: rules: - host: foo.io http: paths: - path: /api/authservice/(.*) /$1 backend:

Global configuration of security in Traefik for Docker

半世苍凉 提交于 2019-12-19 11:26:09
问题 Since version 1.5 Traefik give option to configure security for each service. These options are for available here https://docs.traefik.io/configuration/backends/docker/#security-headers and must be set in the label section of each service defined in the docker-compose file. I wonder how can I add these options in a global manner? 回答1: So just for posterity, here is how to do it using a template file: Get the template docker.tmpl from source and make sure it's for your exact version. The

Is there an equivalent to ReverseProxyPass for Apache in Traefik?

倾然丶 夕夏残阳落幕 提交于 2019-12-19 09:02:46
问题 I have setup Traefik to work in Docker Swarm mode. I have deployed Portainer into the cluster with the following command: docker service create \ \ --label "traefik.port=9000" \ --label "traefik.docker.network =traefik-net" \ --label "traefik.frontend.rule=Host:`hostname -f`;PathPrefixStrip:/portainer" \ --label="traefik.backend=portainer" \ \ --network traefik-net \ --constraint "node.role == manager" \ -p 9000:9000 \ --mount "type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock" \ -

gitlab in docker behind traefik proxy fails (usually)

大兔子大兔子 提交于 2019-12-19 07:18:57
问题 I have several web sites running in docker with LetsEncrypt credentials and routed via traefik. I would like to run a local gitlab-ce in docker similarly with LetsEncrypt and traefik. So I added this to my traefik.toml file: [[acme.domains]] main = "gitlab.mydomain.com" And this to config/gitlab.rb: external_url "http://gitlab.mydomain.com" And I start gitlab with: docker run -d --restart=always \ --hostname gitlab.mydomain.com \ --expose 80 \ --volume /srv/gitlab/config:/etc/gitlab \ -

Unable to redirect from http to https behind AWS load balancer

对着背影说爱祢 提交于 2019-12-13 14:48:37
问题 I'm running traefik on an AWS instance with a rancher back-end. I am terminating SSL at the AWS load balancer, and am communicating on port 80 with the instance, which forwards the :80 traffic to the traefik container. So the Load balancer currently has: https:443 ==> http:80 http:80 ==> http:80 That means, if you type https://example.com, you get SSL, and if you type http://example.com, you just get an ordinary http connection. The desire is to have an auto redirect via http 302 -- it would

Kafka behind Traefik on Kubernetes

人盡茶涼 提交于 2019-12-13 03:56:06
问题 I am trying to configure a Kafka cluster behind Traefik but my producers and client (that are outside kubernetes) don't connect to the bootstrap-servers. They keep saying: "no resolvable boostrap servers in the given url" Actually here is the Traefik ingress: { "apiVersion": "extensions/v1beta1", "kind": "Ingress", "metadata": { "name": "nppl-ingress", "annotations": { "kubernetes.io/ingress.class": "traefik", "traefik.frontend.rule.type": "PathPrefixStrip" } }, "spec": { "rules": [ { "host":

Which matcher should I use for a service, hosted on localhost {port} for a local Service Fabric cluster

送分小仙女□ 提交于 2019-12-13 03:46:36
问题 I have a question regarding Service Fabric and Traefik. I have managed to succesfully deploy the Traefik application to a local cluster (and actually out in my own Azure Infra too). This is alongside a service (MyService) in another application I am trying to have Traefik (RP) sit in front of. I can see the Traefik dashboard, and I can see a backend (seemingly indicating that it has succesfully called the SF management API correctly for my application and service). I can also see an

Regex to match strings that do not start with www in golang

自古美人都是妖i 提交于 2019-12-12 01:17:21
问题 I have the following RegEx ^http:\/\/(?!www\.)(.*)$ Expected behavior: http://example.com - Match http://www.example.com - Does not match It looks like golang does not support negative lookahead. How can I rewrite this RegEx to work on golang ? UPDATE I'm not coding using golang, I'm using Traefik that accepts a Regex (golang flavor) as a config value, so basically I have this: regex = "^https://(.*)$" replacement = "https://www.$1" What I want is to always add www. to the URL, but NOT if the

SSL passthrough with Traefik

泪湿孤枕 提交于 2019-12-11 23:32:05
问题 I need to send the SSL connections directly to the backend, not decrypt at my Traefik. The backend needs to receive https requests. I tried the traefik.frontend.passTLSCert=true option but getting "404 page not found" error when I access my web app and also get this error on Traefik container traefik | time="2018-09-16T10:47:41Z" level=error msg="Failed to create TLSClientConfig: no TLS provided" traefik | time="2018-09-16T10:47:41Z" level=error msg="Failed to create RoundTripper for frontend

Setting an environmental variable in a docker-compose.yml file is the same as setting that variable in a .env file?

假如想象 提交于 2019-12-11 18:38:06
问题 I'm trying to set a specific environmental variable in my docker-compose.yml file. I don't think my docker-compose up is registering/reading it correctly. apigateway.web: image: traefik command: --api --docker # Enables the web UI and tells Traefik to listen to docker environment: - COMPOSE_CONVERT_WINDOWS_PATHS=1 ports: - "80" # The HTTP port - "8080" # The Web UI (enabled by --api) volumes: - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events I know