kind: NetworkPolicy
apiVersion: extensions/v1beta1
metadata:
   name: allow-frontend
   namespace: myns
spec:
   podSelector:
      matchLabels:
         role: backend
   ingress:
   - from:
     - podSelector:
         matchLabels:
            role: frontend
     ports:
     - protocol: TCP
       port: 6379
