---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy

metadata:
  name: minio-server
  labels:
    app.kubernetes.io/name: minio
    app.kubernetes.io/component: server

spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: minio
      app.kubernetes.io/component: server

  policyTypes:
    - Ingress
    - Egress

  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              app.kubernetes.io/name: ingress-nginx
      ports:
        - protocol: TCP
          port: 9000

  egress:
    - {}

...
