diff --git a/network-policies/cacheservicepolicy.yaml b/network-policies/cacheservicepolicy.yaml new file mode 100644 index 0000000..cef3f74 --- /dev/null +++ b/network-policies/cacheservicepolicy.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: cache-allow-cart + namespace: default +spec: + podSelector: + matchLabels: + app: redis-cart + ingress: + - from: + - podSelector: + matchLabels: + app: cartservice + ports: + - port: 6379 \ No newline at end of file