Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

280
Views
Map public container port for few private in Rancher

How to map single public port of container for few private ports in Rancher Cattle to make port sink? Maybe i should write custom HAProxy config?

For example:

5555/tcp -> 5555/tcp
5555/tcp -> 5556/tcp
5555/tcp -> 5557/tcp
5555/tcp -> 5558/tcp
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

What you are asking for is easily possible in Rancher.

One of the ways of implementing this:

  1. "Add Stack" in Rancher
  2. "Add Service" one (which has the tcp service running on port 5555) to the stack.
  3. "Add Service" two (which has the tcp service running on port 5556) to the stack.
  4. "Add Service" three (which has the tcp service running on port 5557) to the stack.
  5. "Add Service" four (which has the tcp service running on port 5558) to the stack.
  6. "Add Load Balancer" to this stack and configure it.
    • Add port Rule with protocol: tcp, port: 5555 with target to one, port: 5555
    • Add port Rule with protocol: tcp, port: 5555 with target to two, port: 5556
    • Add port Rule with protocol: tcp, port: 5555 with target to three, port: 5557
    • Add port Rule with protocol: tcp, port: 5555 with target to four, port: 5558

If you want this load balancer to run on all hosts, you can choose that option when creating the load balancer service.

Also if your service was running on HTTP instead of TCP, you could use that option as well.

Once you have this working manually you can "View Config" to get the docker-compose.yml and rancher-compose.yml files. You can use them to create your custom catalog item and deploy it in one click!

Check out the community-catalog for inspiration and the docs for instructions.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!