Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Selector Rules

satrapu edited this page Oct 14, 2017 · 4 revisions

This page details how to setup a load balancer to distribute requests made against several instances of DokuWiki hosted on a running instance of Rancher server using labels attached to these instances.

More information can be found here.

  1. Go to Rancher UI
  2. Upgrade service dokuwiki1 by adding one label: dokuwiki=blue
  3. Upgrade service dokuwiki2 by adding one label: dokuwiki=red
  4. Edit the Load Balancer for HTTP and HTTPS and add 2 Selector Rules
    1. Selector Rule 1
      1. Access: Public
      2. Protocol: HTTPS
      3. Request Host: leave empty
      4. Port: 4443
      5. Path: /
      6. Target: dokuwiki=blue
      7. Port: 80
    2. Do the same for Selector Rule 2, just change Target to dokuwiki=red
  5. Click the "Edit" button
  6. Go to the load balancer service and click the new "4443/tcp" link from Ports field
  7. You should now see both DokuWiki instances over HTTPS
  8. Edit once again the load balancer and modify Selector Rule 1, by changing Target to dokuwiki=yellow
  9. Click the "Edit" button
  10. Go to the load balancer service and click the new "4443/tcp" link from Ports field
  11. Try refreshing the page several times and you will notice DokuWiki Instance #1 no longer appears
Clone this wiki locally