istio版本: 1.6.3

在istio中新建VirtualService的时候发生报错

报错如下:

error validating data: [ValidationError(VirtualService.spec.tls[0].match[0]): unknown field “snihosts” in io.istio.networking.v1alpha3.VirtualService.spec.tls.match, ValidationError(VirtualService.spec.tls[1].match[0]): unknown field “snihosts” in io.istio.networking.v1alpha3.VirtualService.spec.tls.match]; if you choose to ignore these errors, turn validation off with –validate=false

解决方法:

将yml文件中的sni_hosts改为sniHosts

kind: VirtualService
metadata:
name: nginx
spec:
hosts:
- nginx.example.com
- nginx.api.com
gateways:
- mygateway
tls:
- match:
- port: 443
sniHosts:
- nginx.example.com

欢迎留言