t=&#34;${CTX_CLUSTER2}&#34; -f cluster2.yaml
</code></pre><h2 id=enable-endpoint-discovery>Enable Endpoint Discovery</h2><p>Install a remote secret in <code>cluster2</code> that provides access to <code>cluster1</code>’s API server.</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ istioctl x create-remote-secret \
    --context=&#34;${CTX_CLUSTER1}&#34; \
    --name=cluster1 | \
    kubectl apply -f - --context=&#34;${CTX_CLUSTER2}&#34;
</code></pre><p>Install a remote secret in <