kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
    name: backend-ingress-allow
    namespace: test-webapp-backend
    selfLink: >-
        /apis/networking.k8s.io/v1/namespaces/test-webapp-backend/networkpolicies/backend-ingress-allow
    uid: d6ebce46-cfe0-4e92-821f-10c57d1cae0b
    resourceVersion: '140041930'
    generation: 1
    creationTimestamp: '2020-11-25T08:06:58Z'
    annotations:
        kubectl.kubernetes.io/last-applied-configuration: >
            {"apiVersion":"networking.k8s.io/v1","kind":"NetworkPolicy","metadata":{"annotations":{},"name":"backend-ingress-allow","namespace":"test-webapp-backend"},"spec":{"ingress":[{"from":[{"namespaceSelector":{"matchLabels":{"name":"test-webapp-frontend"}},"podSelector":{"matchLabels":{"app":"frontend"}}}]}],"podSelector":{"matchLabels":{"app":"backend"}},"policyTypes":["Ingress"]}}
spec:
    podSelector:
        matchLabels:
            app: backend
    ingress:
        -
            from:
                -
                    podSelector:
                        matchLabels:
                            app: frontend
                    namespaceSelector:
                        matchLabels:
                            name: test-webapp-frontend
    policyTypes:
        - Ingress

