apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: crowdsec-lapi namespace: crowdsec spec: podSelector: matchLabels: k8s-app: crowdsec type: lapi policyTypes: - Ingress ingress: - from: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: traefik podSelector: matchLabels: app.kubernetes.io/name: traefik - podSelector: matchLabels: k8s-app: crowdsec type: agent ports: - protocol: TCP port: 8080