Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, i.m trying this one on a Google Compute Engine instance with Ubuntu 16.04. Everything worked great until step 5. After running the ‘sudo iptables -t nat -L PREROUTING’ command, i saw that on the destination field instead of my server ip, i’ve got my ip in reverse(if i entered let’s say 1.2.3.4 – on destination woud appear 4.3.2.1.bc.googleusercontent.com - ofc this is just an examples). After that if i run ‘curl --verbose ‘http://your_server_ip’’ - i get connection refused. What can i do?
If you’d like a nice web UI to go along with your newly installed LXD setup take a loot at lxdui ( https://github.com/adaptivescale/lxdui ). It’s open source and makes container management with LXD a breeze.
Hello, I made 2 Google Compute Engine Instances:
Instance 1: nginx, php-fpm7.1, mysql,wordpress Instance 2: everything from instance 1 in an LXD Container
Your tutorial works good, but I saw an increase in CPU percentage. On stand-by, without any traffic, instance 1 stays at around 0,4% CPU and instance 2 at around 1,3% CPU. I’ve tested both instances with loader.io with the same load and instance 1 went to around 6% CPU while instance 2 went to around 20% CPU. This is normal? Why? What can I do? I rly love those lxd containers, but this is something I rly don’t like for the moment.
Hello, one quick question: You said that the smallest size for the preallocated file should be 15gb, because I should remain with 10gb free. can you explain further what that means? Let’s say I have a 20gb ssd. I should go with 15gb preallocated file or with 20gb? let’s say I make the preallocated file 15gb, after I make all my containers I should remain with 10gb/15gb?
Hi, this is a really nice tutorial, but my container is not getting an IP address. I followed this to the letter on a brand new droplet. Any suggestions as to why this would happen and how to fix it?
Edit: I created an alpine linux container and it has an IP address and internet access.
I am unsure about how much space is recommended for a zfs pool. 15g sounds a little low. How much pool space does a instance need?
Thanks for a great tutorial. Can you please extend the tutorial for the case where the public IP has two values? One value is the IP address of the host server and the other value is the IP address of the floating IP assigned to the host server?
I tried this by adding to iptables but the floating IP is still not directing to container. 1.2.3.4 is IP address of host and 7.8.9.0 is floating ip assigned to host:
root@w1:~# iptables -t nat -L PREROUTING
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere 1.2.3.4 tcp dpt:24 /* forward to the Nginx container */ to:10.35.40.78:22
DNAT tcp -- anywhere 7.8.9.0 tcp dpt:24 /* forward to the Nginx container */ to:10.35.40.78:22
DNAT tcp -- anywhere 1.2.3.4 tcp dpt:https /* forward to the Nginx container */ to:10.35.40.78:443
DNAT tcp -- anywhere 7.8.9.0 tcp dpt:https /* forward to the Nginx container */ to:10.35.40.78:443
DNAT udp -- anywhere 1.2.3.4 udp dpt:24 /* forward to the Nginx container */ to:10.35.40.78:22
DNAT udp -- anywhere 7.8.9.0 udp dpt:24 /* forward to the Nginx container */ to:10.35.40.78:22
DNAT tcp -- anywhere 1.2.3.4 tcp dpt:http /* forward to the Nginx container */ to:10.35.40.78:80
DNAT tcp -- anywhere 7.8.9.0 tcp dpt:http /* forward to the Nginx container */ to:10.35.40.78:80
Hi
Is there supposed to be an extra -m comment in there?
As in…
-m comment --comment "forward to the Nginx container"
Hello, I’ve successfully navigated the tutorial and my traffic is correctly routed through to my container.
I have assigned a public ipv4 to my container such that ‘lxc list’ command shows the container running with two IPs - the private (bottom) and the public (top).
+------+---------+-----------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+-----------------------+------+------------+-----------+
| c2 | RUNNING | x.x.x.18 (eth0) | | PERSISTENT | 0 |
| | | 10.x.x.25 (eth0) | | | |
+------+---------+-----------------------+------+------------+-----------+
When an outside source receives the connection from my container, it registers the IP as the HOST IP, not the containers assigned public ipv4. How I can remedy such that assigned ipv4 ‘x.x.x.18’ is seen by the public?
Further: If I set the preforwarding rules using the container private IP (10.x.x.25), the process works with the host IP being seen by the public.
If I use the added public ipv4 (x.x.x.18) to the forwarding rule, communication breaks down and the public can no longer see the container.
Thanks