Create a `redis` deployment using the image `redis:alpine` with `1 replica` and . . .

karthi Mahadev:
Create a redis deployment using the image redis:alpine with 1 replica and label app=redis. Expose it via a ClusterIP service called redis on port 6379. Create a new Ingress Type NetworkPolicy called redis-access which allows only the pods with label access=redis to access the deployment.

and my netowrk pol is this, whats wrong with this ? please

apiVersion: <|>
kind: NetworkPolicy
  name: redis-access
  namespace: default
  podSelector: {}
  - Ingress
  - from:
    - podSelector:
           access: redis

karthi Mahadev:
I saw the solution video and understood " to access the deployment." word make the difference, I should apply this on only this deployment…

Empty podselector tag would applicable to all pods

Mohamed Ayman: