79161729

Date: 2024-11-06 07:55:53
Score: 3.5
Natty:
Report link

I realised the stuff i posted is just the pipeline so let me rephrase my question:

I do an nslookup of the mail server and i get several IP Addresses. The string should be in a variable f.e. $result and the output should be in a structure in an array. Is there some kind of regex to select the relevant IP addresses?

The same would i like to do with the network policy: kubectl get networkpolicy -n -o jsonpath='{.spec}'

I would like to transform the JSON to a Powershell-Object and the relevant output into a "loop" with the IP addresses compare.

Compare the IP addresses from nslookup with IPs in the network policy.

how to do the syntax?

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Cassnet1