Views:

To update Smart Check network policy run the following script:

 
Before running the script, make sure that --namespace value is the current namespace of your Smart Check deployment.
 
cat <<EOF > networkpolicy-patch.yaml
spec:
  egress:
    - {}
EOF

kubectl config set-context --current --namespace trendmicro

POLS=$(kubectl get networkpolicy -o json|jq -r '.items[].metadata.name')

for pol in $POLS; do kubectl patch networkpolicy $pol --patch-file networkpolicy-patch.yaml ;done;