I'm trying to apply egress port range for my k8s network policy like this:
egress:
- to:
- ipBlock:
cidr: 10.0.0.0/24
ports:
- protocol: TCP
port: 32000
endPort: 32768
Starting fine but when I describe that, I only see that port 32000
is allowed.
Do I miss something? Or have I made some mistake?
Thanks.
It seems you took this example from Targeting a range of Ports. Here are 2 questions:
endPort
works only with NetworkPolicyEndPort
enabled feature. Despite the fact it is states, this feature enabled by default, can you please
check if it turned for you?
endPort
in NetworkPolicy spec?