apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: netpol-rancher
spec:
  podSelector:
    matchLabels:
      app: rancher
  policyTypes:
  - Ingress
  - Egress
  ingress:
  - from: []
    ports:
    - protocol: TCP
      port: 80
    - protocol: TCP
      port: 443
  egress:
  - to: []
    ports:
    - protocol: TCP
      port: 80
    - protocol: TCP
      port: 443
    - protocol: TCP
      port: 636
