You may have services hosted outside of Rancher that you want integrated with Rancher. You can add these services into Rancher by adding an external service.
Inside your stack, you add an external service by clicking on the dropdown icon next to the Add Service button. Select External Service. Alternatively, if you are viewing the stacks at the stack level, the same Add Service dropdown is visible for each specific stack.
You will need to provide a Name and if desired, Description of the service.
Add the target(s) that you want. You can select either an external IP(s) or a hostname (i.e. CNAME). Finally, click Create.
The external service IP(s) and hostname will be shown in the service. Just like our services, you will need to start the external services.
At any time, you can edit the targets in an external service. Click on the Edit within the external service’s dropdown menu. You will have the ability to add more targets or remove existing targets.
With external services, you can set either external IP(s) OR a domain name. The
rancher/external-service is not an actual image, but is required for the
docker-compose.yml. There are no containers created for external services.
version: '2' services: db: image: rancher/external-service redis: image: redis
rancher-compose.ymlusing external IPs
version: '2' services: db: external_ips: - 126.96.36.199 - 188.8.131.52 # Override any service to become an external service redis: image: redis external_ips: - 184.108.40.206 - 220.127.116.11
version: '2' services: db: hostname: example.com