<pre><code>apiVersion: networking.gke.io/v1
kind: MultiClusterIngress
metadata:
  name: terraback-ingress
  namespace: terraback
  labels:
    version: v1
spec:
  template:
    spec:
      backend:
        serviceName: terraback-mcs-api
        servicePort: 8080
      rules:
      - host: socket.yoyo.com #&lt;==== adjust this as needed
        backend:
          serviceName: terraback-mcs-socket
          servicePort: 8081 # &lt;=== This gets routed to servicePort 8081 =&gt; 5050
</code></pre>
<p>I am getting the following error when running the command, what could be the issue? Also where can we get the detailed specification for the yaml file?</p>
<pre><code>(base) PS D:\terraform_small\terra-back&gt; kubectl apply -f mci.yaml
error: error validating &quot;mci.yaml&quot;: error validating data: ValidationError(MultiClusterIngress.spec.template.spec.rules[0]): unknown field &quot;backend&quot; in io.gke.networking.v1.MultiClusterIngress.spec.template.spec.rules; if you choose to ignore these errors, turn validation off with --validate=false
</code></pre>
<p>The syntax is according to
<a href="https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-ingress#cluster_selection" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-ingress#cluster_selection</a>
<a href="https://i.stack.imgur.com/yZLI5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yZLI5.png" alt="enter image description here" /></a></p>

william007
<p>I have modified it to the following and it works</p>
<pre><code>apiVersion: networking.gke.io/v1
kind: MultiClusterIngress
metadata:
  name: terraback-ingress
  namespace: terraback
  labels:
    version: v1
spec:
  template:
    spec:
      backend:
        serviceName: terraback-mcs
        servicePort: 8080
      rules:
      - host: socket.yoyo.com #&lt;==== adjust this as needed
        http:
          paths:
            - backend:
                serviceName: terraback-mcs
                servicePort: 8081 # &lt;=== This gets routed to servicePort 8081 =&gt; 5050
</code></pre>
<p>The syntax can be found in <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/multi-cluster-ingress#multiclusteringress_spec" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/multi-cluster-ingress#multiclusteringress_spec</a></p>
