Skip to content

Commit

Permalink
Update db-network-policy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
riyasoni5990 authored Apr 30, 2023
1 parent 8b928d1 commit fec9c49
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions Network-Policy/Assignment/db-network-policy.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
# Hey there future Kubernetes experts!

# We heard you're working on your db-network-policy assignment. Nice! We can't wait to see what you've come up with.

# And don't worry, we're not just sitting around eating popcorn. We'll be posting our own solution soon, so stay tuned.

# Keep calm and Kube on!

# Love,
# The DevOps Pro Admin Squad ❤️
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: db-network-policy
spec:
podSelector:
matchLabels:
role: db-pod
policyTypes:
- Ingress
- Egress
ingress:
- from:
- podSelector:
matchLabels:
role: internal-db
namespaceSelector:
matchLabels:
name: dev
ports:
- protocol: TCP
port: 8080
egress:
- to:
- ipBlock:
cidr: 172.17.0.0/16
except:
- 172.17.1.0/24
ports:
- protocol: TCP
port: 30000
endPort: 32768

0 comments on commit fec9c49

Please sign in to comment.