Problem with custom gateway when install istio via istioctl

Hello everyone.
As you know installation via helm will be deprecate in future and better to use istioctl.
So I tried to use istioctl but got issue:
When I trying to use options from helm
with values.* :
istioctl manifest apply --set values.gateways.istio-ingressgateway.ports[0].port=80 \ --set values.gateways.istio-ingressgateway.ports[0].name=http2 \ --set values.gateways.istio-ingressgateway.ports[0].targetPort=80 \ --set values.gateways.istio-ingressgateway.ports[1].port=443 \ --set values.gateways.istio-ingressgateway.ports[1].name=https
It returns me error Failed to generate and apply manifests, error: failed to generate tree from the set overlay, error: bad path=value (values.gateways.istio-ingressgateway.port[0].port=80): unknown field "port[0]" in v1alpha1.IngressGatewayConfig
So, maybe I did mistake in this code?
Doc says option to istioctl the same as helm and code above is working with helm.

1 Like

Have you tried using a newest version of istio?
I can run it without error, however port values are not replaced:

[centos@master-0 ~]$ istioctl manifest generate --set  values.gateways.istio-ingressgateway.ports[0].name=xxx | grep xxx
[centos@master-0 ~]$ 

I’ve created https://github.com/istio/istio/issues/23003 to track this.
In the meantime, you should be able to set these through an overlay file (using -f). This is the recommended approach for anything other than eval since it creates a better record of the installed state.
See https://istio.io/docs/setup/install/istioctl/#configure-gateways for some examples.

1 Like

Hello @ostromart , @caruccio

I used overlay file to add mysql port to istio ingressgateway, used the below config. But the expected new port is not added to istio elb.

cat << EOF | istioctl manifest apply -f -
apiVersion: install.istio.io/v1alpha2
kind: IstioControlPlane
spec:
values:
gateways:
istio-ingressgateway:
ports:
- name: mysql
targetPort: 3306
port: 3306
EOF

This sounds like an old issue - which version of istioctl are you using?