frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

If you need Docker Swarm, go with the Time4VPS KVM instances instead of OpenVZ (container) ones

KronisLVKronisLV Member
edited October 2020 in General Discussions

Just a quick post sharing my experience for anyone who wants to run Docker or Docker Swarm inside of OpenVZ (container) VPSes.
Any bits of code are included as images, because the forum formatting is a tad odd. Code screenshots generated with Carbon, in case anyone is wondering.

Summary: Docker runs on the OpenVZ instances, but Docker Swarm doesn't because of a missing kernel module: br_netfilter; go with the KVM instances instead if you need Swarm or another piece of software that relies on kernel modules being loaded.

With Time4VPS starting to use OpenVZ 7, i thought that it'd finally be viable to run container based workloads in a more cost effective manner. Time4VPS is already pretty affordable with their KVM instances, so i figured why not try using the OpenVZ ones for some of the stuff that doesn't really get as much load?

At least initially, that seemed to work, you can install Docker and run containers on it, which is nice. For example, following the official instructions on an Ubuntu VPS:

and running a quick test container seems to work as you'd expect:

You can even make a Docker Swarm cluster:

However, once i tried running actual services on the cluster, i realized that it simply won't work. For example, i tried deploying Portainer, a really nice web interface for managing Docker Swarm and Kubernetes deployments:

Initially it looked like it succeeded, however when i tried accessing it through the web interface, it became apparent that it was not deployed. Looking at the statuses revealed what the problem is:

Essentially, this bit is to blame:

cannot restrict inter-container communication: please ensure that br_netfilter kernel module is loaded

Of course, since you can't modify the enabled kernel modules in OpenVZ, you can't actually fix this:

On the other hand, both Docker and Docker Swarm work on Time4VPS KVM VPSes, so if you need to run Docker Swarm or other bits of code that need specific kernel modules, check out those instances.

Tagged:

Comments

  • Quick note, even if a bit more expensive, i'd say that the KVM instances are worth it anyways, especially because the OSes that they offer are newer and therefore more secure:

  • JustinaJustina Moderator

    Hello,

    we really appreciate your effort to share this tutorial with members of our community! I say thank you on behalf of the entire Time4VPS team.

  • @Justina said:
    Hello,

    we really appreciate your effort to share this tutorial with members of our community! I say thank you on behalf of the entire Time4VPS team.

    Sure thing! I've been using Time4VPS for a while now and it's a pretty good service! So figured i'd share some experience to help others pick the instance type the most suited to their needs, hence the post. :)

Sign In or Register to comment.

Time4VPS

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2024 Time4VPS. All rights reserved.

Get In Touch