---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: guestbook-back
  namespace: default
spec:
  podSelector:
    matchLabels:
      app: redis
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app: guestbook
  - ports:
    - protocol: TCP
      port: 6379
  policyTypes:
  - Ingress
  - Egress
