I’m confused. My load balancer and dns require services to be on the managed 10.42.x.x/16 network. How do I access this network (i.e. port forward/nat)?
I’m using the following:
docker-compose.yml:
version: '2'
volumes:
itrdevpsql:
external: true
driver: rancher-nfs
itrdevcdn:
external: true
driver: rancher-nfs
services:
itrdevpsql:
image: postgres
environment:
POSTGRES_PASSWORD: XXXXXXXXXXXXXXXXXXXXXXXX
POSTGRES_USER: devuser
PGDATA: /var/lib/postgresql/data
POSTGRES_DB: itrdevdb
stdin_open: true
volumes:
- itrdevpsql:/var/lib/postgresql/data
domainname: dev.project
tty: true
labels:
io.rancher.container.pull_image: always
itrdevcdn:
image: nginx
environment:
NGINX_HOST: m.dev.project
NGINX_PORT: '80'
stdin_open: true
volumes:
- itrdevcdn:/usr/share/nginx/html
domainname: dev.project
tty: true
labels:
io.rancher.container.pull_image: always
lbitrdev:
image: rancher/lb-service-haproxy:v0.7.15
ports:
- 0.0.0.0:5432:5432/tcp
- 0.0.0.0:8000:8000/tcp
labels:
io.rancher.container.agent.role: environmentAdmin,agent
io.rancher.container.agent_service.drain_provider: 'true'
io.rancher.container.create_agent: 'true'
rancher-compose.yml:
version: '2'
services:
itrdevpsql:
scale: 1
start_on_create: true
itrdevcdn:
scale: 1
start_on_create: true
lbitrdev:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- backend_name: ''
priority: 3
protocol: tcp
service: itrdevpsql
source_port: 5432
target_port: 5432
- priority: 4
protocol: tcp
service: itrdevcdn
source_port: 8000
target_port: 8000
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 42
unhealthy_threshold: 3
initializing_timeout: 60000
interval: 2000
reinitializing_timeout: 60000