apiVersion: networking.k8s.io/v1 
kind: NetworkPolicy 
metadata: 
  name: override-restriction-policy 
  namespace: development 
spec: 
  podSelector: 
    matchLabels: 
      app: server 
  policyTypes: 
  - Ingress 
  - Egress 
  ingress: 
  - from: 
    - podSelector: 
        matchLabels: 
          app: frontend 
    ports: 
    - protocol: TCP 
      port: 443 
  egress: 
  - to: 
    - podSelector: 
        matchLabels: 
          app: database 
    ports: 
    - protocol: TCP 
      port: 6379 
