Skip to content

Conversation

@mjmanas0699
Copy link

No description provided.

@sk31337
Copy link

sk31337 commented May 28, 2024

@mjmanas0699 i don't think this is the correct solution for Task06.

What do you think about:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: k8s-netpol
  namespace: nemspace-netpol
spec:
  podSelector: {}
  policyTypes:
  - Ingress
  - Egress
  ingress:
  - from:
    - namespaceSelector:
        matchExpressions:
        - key: namespace
          operator: In
          values: ["internal"]
    ports:
    - protocol: TCP
      port: 9200
  egress:
  - to:
    - namespaceSelector:
        matchExpressions:
        - key: namespace
          operator: In
          values: ["nemspace-netpol"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants