Closed hh closed 1 year ago
Should be able to route to kuberenetes api as well.
Giving a go and basic exposing of services out of the Kubevirt VM by using NodePorts. According to the docs, it appears that services running on ports on the VM can be exposed through Kubernetes services. I figure that a chain of code-server container listening process -> NodePort on VM -> Service on management cluster -> Ingress on management cluster
There is a service defined like this active
apiVersion: v1
kind: Service
metadata:
name: nc-nodeport
spec:
externalTrafficPolicy: Cluster
ports:
- name: nodeport
nodePort: 31000 # 30000-32767
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: code-server
type: NodePort
and it is accessible in the code-server container on 8080.
But running into this right now, where a process is showing as listening with ss
but not via nc
I'm running nc -l 8080
in the coder-server container and a NodePort service going from 8080 to 31000
Using while true; do nc -l 8080; done
instead and it is working! Forgot the behaviour of nc
.
I've figured out how to link processes running processes running inside a pod in the cluster to be accessible on the host cluster, via multiple services.
I'm unsure what specifically is meant to be routed. Is it meant to be processes? or what?
If it's meant to be processes, we'll need a web components
Considering that Coder supports port exposing, is such an truly implementation necessary?
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
Outcluster using *.USER.pair.sharing.io
Kubevirt clusters should have a *-workspace-user.USER.pair.sharing.io ingress route from outer cluster to inner. The inner cluster can be plain http for now.