Docker and/or Kubernetes official support

Hello,

Our company manages a few kubernetes cluster, and pritunl is a great choice in managing them. Creating pritunl server is quite easy since there are some unofficial images available. But we cannot seem to find a way for setting up pritunl-client and pritunl-link in docker/kubernetes. Our last resort is to use vanilla openvpn client and use iroute there.

Do you have any plans on better supporting containerized platform?

The same configuration commands should work in a Docker container after the configuration is done run the command pritunl-link start

Ok, I’ll tinker more about pritunl-link, I only tried once. What about the pritunl-client? I tried the documented commands, and it didn’t work. Or maybe it’s expected to not work in a container?

root@eceed50acc65:/# pritunl-client add pritunl://xxxxx
panic: auth: Failed to auth key
open /var/run/pritunl.auth: no such file or directory
ORIGINAL STACK TRACE:
github.com/pritunl/pritunl-client-electron/cli/service.GetAuthKey
	/go/src/github.com/pritunl/pritunl-client-electron/cli/service/utils.go:44 +0x6aded6
github.com/pritunl/pritunl-client-electron/cli/sprofile.Import
	/go/src/github.com/pritunl/pritunl-client-electron/cli/sprofile/utils.go:470 +0x6ba827
github.com/pritunl/pritunl-client-electron/cli/sprofile.ImportUri
	/go/src/github.com/pritunl/pritunl-client-electron/cli/sprofile/utils.go:626 +0x6bbaaf

And when installing, there was some interesting errors.

root@eceed50acc65:/# apt-get update && apt-get -y install gnupg ca-certificates && \
    gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 7568D9BB55FF9E5287D586017AE645C0CF8E292A && \
    { gpg --armor --export 7568D9BB55FF9E5287D586017AE645C0CF8E292A > /etc/apt/trusted.gpg.d/pritunl.asc ; } && \
    { echo "deb https://repo.pritunl.com/stable/apt jammy main" > /etc/apt/sources.list.d/pritunl.list ; } && \
    apt-get update && apt-get -y install pritunl-client
...
ln: failed to create symbolic link '/etc/resolv.conf': Device or resource busy
dpkg: error processing package resolvconf (--configure):
 installed resolvconf package post-installation script subprocess returned error exit status 1
...
dpkg: dependency problems prevent configuration of pritunl-client:
 pritunl-client depends on resolvconf; however:
  Package resolvconf is not configured yet.

dpkg: error processing package pritunl-client (--configure):
 dependency problems - leaving unconfigured

The Pritunl Client requires a systemd service, that will need to be started with pritunl-client-service

If we use containerized Pritunl client we run pritunl-client-service into background mode, b/c container does not have systemd at all

pritunl-client-service &
pritunl-client add pritunl://xxxxx

and it works. Of course, we added watchers for the background process and blah-blah-blah, but this is not a Pritunl story :slight_smile:

Hello,

@s2504s , may I ask you to share with us your Dockerfile for the VPN Client? I am also working on a solution to dockerize the pritunl client and run it in Kubernetes cluster.

Thank you in advance!

Best regards,
Ali Nebi