istio: TCP Gateway/Virtual Service Not Working
I have a test pod in the “coolio” namespace
The pod is loaded with a netshoot image, and runs bash
I manually enter the following iperf service command to open up a TCP listener on port 9999
I can run another pod in my cluster and connect to the iperf service
iperf-svc is a ClusterIP service
In order to allow an iperf client from outside the cluster to connect, I am using an istio virtual service
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: iperf-svc
spec:
hosts:
- "*"
gateways:
- iperf-gateway
tcp:
- match:
- port: 9999
route:
- destination:
host: iperf-svc.coolio.svc.cluster.local
port:
number: 9999
and an istio gateway
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: iperf-gateway
spec:
selector:
run: netshoot-s
servers:
- port:
number: 9999
name: iperf-svc
protocol: TCP
hosts:
- "*"
However I can’t seem to connect to the service from outside the cluster
I think I have properly configured the virtualservice and the gateway.
Note I have used the selector run=netshoot-s
because this is alabel on the service pod
I may have something wrong in my virtual service or gateway, yet the configurations seem consistent with the istio documentation.
Please help
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (6 by maintainers)
I solved this: modeled after tcp-echo, and dug till i figured out how to modify the istio operator’s ingress gateway controller to recognize the additional port.
In addition to this, I reinstalled the istio, with an updated profile, and integration controller
istioctl manifest apply --set installPackagePath=PWD/operator/charts --set profile=PWD/operator/profiles/netshoot.yaml
netshoot.yaml was seeded from demo.yaml, and the following was added:
Also the ingress chart was modified as follows:
😦 This is still not working; discouraging. I’m crawling through the istio documentation to see if there is any clue.