traefik | The Cloud Native Application Proxy | Continuous Deployment library
kandi X-RAY | traefik Summary
kandi X-RAY | traefik Summary
Imagine that you have deployed a bunch of microservices with the help of an orchestrator (like Swarm or Kubernetes) or a service registry (like etcd or consul). Now you want users to access these microservices, and you need a reverse proxy. Traditional reverse-proxies require that you configure each route that will connect paths and subdomains to each microservice. In an environment where you add, remove, kill, upgrade, or scale your services many times a day, the task of keeping the routes up to date becomes tedious. Traefik listens to your service registry/orchestrator API and instantly generates the routes so your microservices are connected to the outside world -- without further intervention from your part.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of traefik
traefik Key Features
traefik Examples and Code Snippets
Community Discussions
Trending Discussions on traefik
QUESTION
I'm working on a Dockerized project which has an Adminer container. I need to increase the value of post_max_size found in /usr/local/etc/php/conf.d/0-upload_large_dumps.ini.
My problem is any attempt to edit the file results in permission denied responses. Usually, this would be a prolem resolved by using sudo but I also get permission denied from that as well.
The following is the output of the directory I'm trying to edit showing the target file is owned by root:
...ANSWER
Answered 2022-Apr-08 at 19:05There is nothing to change in your docker-compose.yaml
.
If you want to change it, you can just exec
in the container as the root user.
So I suppose that, right now, you are doing
QUESTION
I am getting list of videos from youtube API. I want to also get views and comment count in response from youtube apis.
I am trying the following.
...ANSWER
Answered 2022-Apr-08 at 07:50No it is not posible.
Search.list methodYou are using the search.list method Which returns a list of search#resource
QUESTION
We have a 2 node K3S cluster with one master and one worker node and would like "reasonable availability" in that, if one or the other nodes goes down the cluster still works i.e. ingress reaches the services and pods which we have replicated across both nodes. We have an external load balancer (F5) which does active health checks on each node and only sends traffic to up nodes.
Unfortunately, if the master goes down the worker will not serve any traffic (ingress).
This is strange because all the service pods (which ingress feeds) on the worker node are running.
We suspect the reason is that key services such as the traefik
ingress controller and coredns
are only running on the master.
Indeed when we simulated a master failure, restoring it from a backup, none of the pods on the worker could do any DNS resolution. Only a reboot of the worker solved this.
We've tried to increase the number of replicas of the traefik
and coredns
deployment which helps a bit BUT:
- This gets lost on the next reboot
- The worker still functions when the master is down but every 2nd ingress request fails
- It seems the worker still blindly (round-robin) sends traffic to a non-existant master
We would appreciate some advice and explanation:
- Should not key services such as
traefik
andcoredns
be DaemonSets by default? - How can we change the service description (e.g. replica count) in a persistent way that does not get lost
- How can we get intelligent traffic routing with ingress to only "up" nodes
- Would it make sense to make this a 2-master cluster?
UPDATE: Ingress Description:
...ANSWER
Answered 2022-Mar-18 at 09:50Running single node or two node masters in k8s cluster is not recommended and it doesnt tolerate failure of master components. Consider running 3 masters in your kubernetes cluster.
Following link would be helpful --> https://netapp-trident.readthedocs.io/en/stable-v19.01/dag/kubernetes/kubernetes_cluster_architecture_considerations.html
QUESTION
I'm trying to get React to change content of the site when it's file is being saved.
I'm using VS code which doesn't have safe write. I'm using docker-compose on Windows via Docker Desktop.
Dockerfile:
...ANSWER
Answered 2022-Mar-26 at 07:53Shortest way I found was to start from the other side, that is attach editor to container instead of updating container based on changes in system files. I followed the guide here: https://code.visualstudio.com/docs/remote/attach-container
QUESTION
I'm trying to set a server-side event correctly with Traefik to no avail. I have a Django server that has a URL that sends sse, I can proxy easily with nginx with this simple conf:
...ANSWER
Answered 2022-Mar-21 at 15:17It turns out that Django's view that responded with the sse was setting 2 identical headers and that makes Traefik bristle.
Complete explanation on the issue.
Once fixed the headers everything worked.
QUESTION
We are using Linkerd 2.11.1 on Azure AKS Kubernetes. Amongst others there is a Deployment using using an Alpine Linux image containing Apache/mod_php/PHP8 serving an API. HTTPS is resolved by Traefik v2 with cert-manager, so that in coming traffic to the APIs is on port 80. The Linkerd proxy container is injected as a Sidecar.
Recently I saw that the API containers return 504 errors during a short period of time when doing a Rolling deployment. In the Sidecars log, I found the following :
...ANSWER
Answered 2022-Mar-04 at 01:07 annotations = {
"config.linkerd.io/inbound-port" = "80"
}
QUESTION
I am creating a FastAPI server with simple CRUD functionalities with Postgresql as database. Everything works well in my local environment. However, when I tried to make it run in containers using docker-compose up
, it failed. I was getting this error:
ANSWER
Answered 2021-Sep-29 at 20:31First, the SQLALCHEMY_DATABASE_URI
in database.py
should match the user, password and database name suplied in Your docker-compose.yaml
. Ensure that You are running docker-compose up
with correct environ. In Your case, the environ for docker-compose up
should be:
QUESTION
I had the previous version (from last yr) of minio
running well behind traefik
and on portainer
with no issues. I attempted an upgrade 4 days ago to the new version and it's been downhill since then. I get the login page but it won't accept credentials; Error:
{"code":500,"detailedMessage":"Post \"https://storage.example.com/\": dial tcp :443: i/o timeout","message":"invalid Login"}
I suspect it has something to do with the TLS certificate.
Below is my compose file, I've generated the certs as required; any assistance is is welcomed:
...ANSWER
Answered 2021-Oct-08 at 06:11I was getting the same Invalid Login
error: Post "http://minio.localhost/": dial tcp: lookup minio.localhost on 127.0.0.11:53: no such host
.
The following docker-compose.yml
works. The solution is NOT to use MINIO_DOMAIN
or MINIO_SERVER_URL
. See # comments
at environment:
variables.
QUESTION
I would like to serve custom error pages for common HTTP error codes. I was following this tutorial. For this purpose, I created the following docker-compose.yml
file to test the functionality. It consists of:
errorPageHandler
which is a nginx server which is able to return static HTML pages (404.html
and502.html
).whoami1
which routes the request to port 80 oftraefik/whoami
imagewhoami2
which routes the request to non-existent port 81 oftraefik/whoami
image which results in 502 - Bad Gateway
ANSWER
Answered 2022-Feb-08 at 12:25The traefik routers (whoami1 and whoami2) needs to use the error middleware that you defined
https://doc.traefik.io/traefik/middlewares/http/errorpages/ Traefik error middleware docs
So add the following labels to their respective containers
QUESTION
I am trying to setup a certificate for a locally running react app on a virtual host local.example.com
. This has to just work locally on docker setup. After going through some articles, I came up with this docker-compose.yml:
ANSWER
Answered 2022-Jan-31 at 13:05You need to use TLS for your local setup. The host you need a certificate for is local.example.com
. There is no way to obtain a certificate from Letsencrypt
for this name, because you're not controlling the example.com
domain. One of the ways Letsencrypt
creates a certificate is a challenge - you prove that you own the domain by creating a TXT DNS record. If you own a domain you can do that, but your case is different, because you only need this for local development.
However, you can just use openssl
to generate a self signed certificate for whichever domain name you want. This is a good reference on how to do this. You can use the local.example.com
domain name for the generated certificate. If you're successful, you'll end up with the certificate and it's private key. Note where you save those files, as you'll need them. Keep in mind that the certificate is self-signed, so your browser will give you a warning, unless you add this certificate to the trust store of your operating system.
The next step in your case is to make Traefik use those self signed certificates when serving content from your application. I think this answer has a good example of that.
After having this, you'll only need to edit your hosts file and redirect your localhost:8080
(the port on which your Traefik serves your application) to local.example.com
.
Also, Traefik is not the only solution for your case. You can also achieve the same using Nginx, for example. Choose which one satisfies your use case. My suggestion would be to use the one that's easiest to configure, because it's for local development. Here's the first result I got when searching for a nginx docker-compose self-signed certificate
.
UPDATE
Here's a quick example of what I'm describing above.
First generate the certificate:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install traefik
Grab the latest binary from the releases page and run it with the sample configuration file:
Or use the official tiny Docker image and run it with the sample configuration file:
Or get the sources:
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page