External Services

I’m new to Rancher and I’m trying to setup an internal Galera cluster for use by Rancher using this tutorial:

I’ve modified the files here:

with:

external_ips:
- 192.168.1.231

expose:

  • 3308:3307/tcp
    tty: true
    image: rancher/external-service

But when I try to connect to .231 with the client it fails to connect. If I use the original files I can connect to the cluster IP (10…) fine.

How do I expose the Galera cluster externally?

External services are for your containers to access services outside of rancher. For example, you might run MySQL on a conventional VM and have your containers connect to it. See here:
http://rancher.com/docs/rancher/latest/en/cattle/adding-external-services/

Rancher exposes 3306/3307 on the galera-lb container. Check what host it is running on and you can use that IP to connect.

The yaml is set for 3308. I’ve tried connecting on that port. Should I be connecting to a different port?

I ended up creating the service and load-balancer in the UI and exporting the config.