kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  namespace: kube-system
  name: heapster-policy
spec:
  podSelector:
    matchLabels:
      app: heapster
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          heapster: ingress
    - podSelector:
        matchLabels:
          app: heapster
    - podSelector:
        matchLabels:
          heapster-metrics: enabled
    - podSelector:
        matchLabels:
          app: kubernetes-dashboard
#  - ports:
#    # used for "kubectl top pods --heapster-port=80"
#    - port: 80
#    - port: 8082
#    - port: 8083
