0

I am running a kubernetes cluster on vagrant virtual machines. In one pod, there is a matplotlib window to be opened. I have successfully set up the x11 interface between my host machine and the guest so that I can visualize matplotlib figures from the master node virtual machine. What I tried so far was to mount the /tmp/.X11-unix volume into my container and installed xauth. But the trouble is with the Display variable because I get the error message:

qt.qpa.screen: QXcbConnection: Could not connect to display :0 Could not connect to any X display.

Display variables I tried:

  • :0
  • :1
  • :localhost:10 (this is the value of the DISPLAY variable on the guest VM )
  • :Guest_VM_IP:10

Does anyone have an idea what could be missing ?

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712
Paul Rousseau
  • 571
  • 2
  • 7
  • 21
  • Have you seen this? https://stackoverflow.com/questions/56398680/is-it-possible-to-deploy-a-gui-application-using-kubernetes, and this https://stackoverflow.com/questions/46018102/how-can-i-use-matplotlib-pyplot-in-a-docker-container ? Although I really don't understand WHY are you running Kubernetes inside Vagrant. you can use Minikube directly, you'll have cluster isolation and will remove one step from the equation. maybe think of creating a web app server like Jupyter or use a cloud provided data analysis could be interesting. – Will R.O.F. Jan 30 '20 at 13:45
  • Thanks for the comment, I will take a look at those sites. To your question why I use Kubernetes on vagrant, please refer to this site: https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/ – Paul Rousseau Jan 30 '20 at 14:36

0 Answers0