Replies: 2 comments 4 replies
-
You shouldn't use CapRover's replicas in this case. You should create two separate apps and manually change their NodeID to the respective nodes. |
Beta Was this translation helpful? Give feedback.
4 replies
-
If anyone wants to share ports in host mode via a service override, this is a working YAML override for AdGuardHome. EndpointSpec:
Ports:
- Protocol: udp
TargetPort: 53
PublishedPort: 53
PublishMode: host
- Protocol: tcp
TargetPort: 53
PublishedPort: 53
PublishMode: host
- Protocol: tcp
TargetPort: 80
PublishedPort: 8080
PublishMode: host
- Protocol: tcp
TargetPort: 853
PublishedPort: 853
PublishMode: host
- Protocol: udp
TargetPort: 67
PublishedPort: 67
PublishMode: host
- Protocol: tcp
TargetPort: 68
PublishedPort: 68
PublishMode: host |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a two node CapRover instance. I'd like to run an instance of AdGuardHome on each node for redundancy. AGH requires a persistent volume and also the DNS and DHCP ports (53, 67, 68 & 853) mapped through to the container.
I'm struggling to find a way to do this.
At first, I thought I could just add a second replica and that would create another instance with it's own volume which I could manually configure. But the replicas share the same volume.
Next, I thought I'd be able to create a second instance of AGH and then manually bind it to the worker node. That doesn't work because there can only be one container per-swarm with a given mapped port.
The internet suggested I could change to publishing posts in host mode (instead of mesh) and that should allow me to have port 53 mapped to a container on each swarm node. So I removed all the mapped ports from the primay AGH instance, created a second one (removed it's maps ports) and moved it to my worker node. Then tried to add host mode port mapping like:
And swarm seemed to choke on that.
Am I missing something obvious, or am I just trying to do something that Swarm is ill-suited to?
Thanks for any pointers.
Beta Was this translation helpful? Give feedback.
All reactions