kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: training
  labels:
    app: training
spec:
  podSelector:
    matchLabels:
      app: training
  ingress:
  - from:
    - podSelector:
        matchLabels:
          trusted: "yes"

# more info: https://kubernetes.io/docs/concepts/services-networking/network-policies/