Exposing Ports
You can expose TCP ports to the outside world by specifying the ports you want to expose in theports parameter.
ports accepts a list, so you can expose multiple ports too.
In the example below, we expose two ports:
8888for a Jupyter Notebook server3000for a separate application or web server
Network Security
Blocking Outbound Traffic
You can block all outbound network access from your Pod while still allowing inbound connections to exposed ports. This is useful for security-sensitive workloads that shouldn’t communicate with external services.block_network=True, the Pod can receive requests on exposed ports but cannot make outbound connections to external services.
Allow Lists
Allow only specific hostnames, wildcard domains, IPs or CIDRs. All other outbound destinations are blocked.allow_list with block_network=True.