oad in the <code>foo</code> namespace.
Run the following command to apply the policy to allow requests to port 9000 and 9001:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f - &lt;&lt;EOF
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: tcp-policy
  namespace: foo
spec:
  selector:
    matchLabels:
      app: tcp-echo
  action: ALLOW
  rules:
  - to:
    - operation:
       ports: [&#34;9000&#34;, &#34;9001&#34;]
EOF
</code></pre></