-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b928d1
commit fec9c49
Showing
1 changed file
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |