istio / istio.io

Source for the istio.io site
https://istio.io/
Apache License 2.0
760 stars 1.53k forks source link

Example of "Virtual Machines in Multi-Network Meshes" is outdated #8602

Closed rinormaloku closed 3 years ago

rinormaloku commented 3 years ago

Following the guide as explained in this doc: "https://istio.io/latest/docs/examples/virtual-machines/multi-network/" is failing:

$ istioctl install -y -f - <<EOF
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  values:
    global:
      meshExpansion:
        enabled: true
      multiCluster:
        clusterName: kube-cluster
      network: main-network
      meshNetworks:
        main-network:
          endpoints:
          - fromRegistry: kube-cluster
          gateways:
          - registryServiceName: istio-ingressgateway.istio-system.svc.cluster.local
            port: 443
EOF

# Output
! values.global.meshExpansion.enabled is deprecated; use Gateway and other Istio networking resources, such as in samples/istiod-gateway/ instead
✔ Istio core installed                                                                                               
✔ Istiod installed                                                                                                   
- Processing resources for Ingress gateways.                                                                         2020-11-30T09:08:22.624826Z     error   installer       failed to create "Service/istio-system/istio-ingressgateway": Service "istio-ingressgateway" is invalid: [spec.ports[4].name: Duplicate value: "tcp-istiod", spec.ports[4]: Duplicate value: core.ServicePort{Name:"", Protocol:"TCP", AppProtocol:(*string)(nil), Port:15012, TargetPort:intstr.IntOrString{Type:0, IntVal:0, StrVal:""}, NodePort:0}]
✘ Ingress gateways encountered an error: failed to create "Service/istio-system/istio-ingressgateway": Service "istio-ingressgateway" is invalid: [spec.ports[4].name: Duplicate value: "tcp-istiod", spec.ports[4]: Duplicate value: core.ServicePort{Name:"", Protocol:"TCP", AppProtocol:(*string)(nil), Port:15012, TargetPort:intstr.IntOrString{Type:0, IntVal:0, StrVal:""}, NodePort:0}]
- Pruning removed resources                                                                                          Error: failed to install manifests: errors occurred during operation

I checked and the tcp-istiod port is defined twice in the generated manifest. The reason I am adding it here and not in Istio is that it seems that the new approach for adding VMs should not use the property values.global.meshExpansion.enabled

frankbu commented 3 years ago

@stevenctl PTAL