Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added network policy #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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