n: CUSTOM
  provider:
    name: &#34;opa.default&#34;
  rules:
  - to:
    - operation:
        notPaths: [&#34;/ip&#34;]
EOF</code></pre></div></div></div><h3 id=test-the-opa-policy>测试 OPA 策略</h3><ol><li><p>创建一个客户端 Pod 来发送请求：</p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.25/samples/sleep/sleep.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f @samples/sleep