<p>I have a docker container that runs an Ubuntu image that then runs a windows vm via qemu-system-x86_64.</p>
<p>I can use spice to access the windows vm by sharing a port with the docker container and then I tell qemu-system-x86_64 to use that port for spice.</p>
<p>Running container:</p>
<p><code>docker run -p 5930:5930... </code></p>
<p>Inside of container:</p>
<p><code>qemu-system-x86_64 -spice port=5930,disable-ticketing...</code></p>
<p>This works from a remote machine on the same VPN by using this address:</p>
<p><code>spice://&lt;server ip&gt;:5930</code></p>
<p>I now have this container running in a kubernetes pod inside minikube, but I'm not sure what kind of service to use to access the spice server remotely.</p>

Phillip Merritt
<p>Use microk8s. Put your container into pod and create service with NodePort.</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: my-pod
    image: image here
    ports:
    - containerPort: 5930

apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: NodePort
  selector:
    app: my-pod
  ports:
    - port: 5930
      nodePort: 30000
</code></pre>
<p>Now call http://server_ip:30000</p>
