apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: no-internet
spec:
  podSelector:
    {}
  policyTypes:
  - Ingress
  - Egress
  ingress:
  - from:
    - namespaceSelector: {}
    - podSelector: {}
    - ipBlock:
        cidr: 10.0.0.0/8
    - ipBlock:
        cidr: 172.16.0.0/12  
    - ipBlock:
        cidr: 192.168.0.0/16
    - ipBlock:
        cidr: 169.254.0.0/16
    - ipBlock:
        cidr: 127.0.0.0/8
  egress:
  - to:
    - namespaceSelector: {}
    - podSelector: {}
    - ipBlock:
        cidr: 10.0.0.0/8
    - ipBlock:
        cidr: 172.16.0.0/12  
    - ipBlock:
        cidr: 192.168.0.0/16
    - ipBlock:
        cidr: 169.254.0.0/16
    - ipBlock:
        cidr: 127.0.0.0/8
