apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: arf-api-ingress namespace: arf-system spec: podSelector: matchLabels: app: arf-api policyTypes: - Ingress ingress: # Allow traffic only from the gateway pods on port 8000 - from: - podSelector: matchLabels: app: arf-gateway ports: - port: 8000 protocol: TCP