To add TCP custom port in istio ingress-gateway serivce

Dear Support Team
I enabled the istio with add-on.
The istio have well configured.
I want to configure the custom TCP port in ingress-gateway as NodePort.
The TCP port is 5222.

As far as I know, I had configured as follow.

  1. Edit istio-ingressgateway -n istio-system
  2. Create the gw on the tcp 5222 port
  3. Create the virtualservice on it.

kubectl edit svc -n istio-system istio-ingressgateway

  • name: xmpp-tcp
    nodePort: 30622
    port: 5222
    protocol: TCP
    targetPort: 5222

kubectl edit gw xmpp-gateway-tcp

apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: xmpp-gateway-tcp
namespace: default
spec:
selector:
istio: ingressgateway
servers:

  • hosts:
    • “*”
      port:
      name: xmpp-tcp
      number: 5222
      protocol: tcp

kubectl edit virtualservice xmpp-tcp

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: xmpp-tcp
spec:
gateways:

  • krms-gateway-tcp
    hosts:
  • xmpp-test.test.com
    tcp:
  • match:
    • port: 5222
      route:
    • destination:
      host: xmpp
      port:
      number: 5222

Is that command CLI right?
Should I create the ingress-gateway to add the custom port with only LoadBalancer type ?