Accessing services running in LXD instances

preview_player
Показать описание
A very frequent topic on our forum is how to expose a service running inside of a LXD instance to the outside world. There are quite a few ways to do that depending on your network setup and on exactly what you want to expose.

In this video, we're going over the most common options:
- Directly routing the lxdbr0 subnet
- Using macvlan
- Using a bridge
- Using a proxy device

TIMESTAMPS:
0:00 Introduction
0:34 Environment
2:36 Routed subnet
4:48 Macvlan
7:26 Bridging
11:00 Proxy device (NAT)
14:08 Proxy device (TCP)
15:52 Proxy device (Unix)
18:50 Proxy device (TCP with proxy protocol)
20:38 Conclusion

RESOURCES:
Рекомендации по теме
Комментарии
Автор

Proxy device to an IP-less container via socket looks quite interesting indeed, thank you Stéphane!

YosuCadilla
Автор

I got recommended this randomly and i love this

epicgamerman
Автор

What about having Hyper-V as a hypervisor on Windows PC (nested virtualization enabled as well as MAC spoofing using External Switch) and on top of that Hyper-V is a Ubuntu 20.04 that hosts LXD container (Windows server 2022 VM). My server VM (container) isn't able to get any network connection, via DHCP or with static IPs. I'm using netplan for setting up of bridge. The bridge is applied to single physical NIC and my Ubuntu that hosts LXD Windows VM container has full network connectivity. But LXD container doesn't get any address. Is this scenario even supported? I know this complicates matters but this is my present setup: my Windows 10 laptop -> Hyper-V -> Ubuntu VM -> LXD VM container.

iachtulhu
Автор

i use alpine on lxd with a raspberrypi as the host system

ImbraWolf
Автор

is it possible to config proxy on a lxd vms? I'm trying to access an application running on a specific port on lxd vm using a specific port of lxd host.
sadly im hit with some errors and im not able to go further. thanks

sanjeethg
Автор

I am using a proxy device (TCP) to connect to a nextcloud instance running in a container as this is a much simpler solution than using ngnix as a reverse proxy server. However how do I ensure that the nextcloud is working on https rather than just http - I assume that I would need to use Let's encrypt somewhere along the way?

Thanks in advance for any help given!!

mattparry
Автор

I am thinking about a 3 node cluster, using a fan networking setup in lxd init, I only have one IP address on each host. Will the last proxy device example work? Will the config be applied for all hosts? Can the container be migrated to other hosts without config change?

MrRhysstevens
Автор

Is it possible to configure the proxy device (nat) with ipv6?

dreamtexx