Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from kaviththiranga/master
Browse files Browse the repository at this point in the history
Prevent outbound traffic from executors
  • Loading branch information
kaviththiranga committed Nov 25, 2019
2 parents c3d6534 + d91b774 commit a782b25
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions k8s/network/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Enable
gcloud container clusters create [CLUSTER_NAME] --enable-network-policy

or

gcloud container clusters update [CLUSTER_NAME] --update-addons=NetworkPolicy=ENABLED
gcloud container clusters update [CLUSTER_NAME] --enable-network-policy


# Disable

gcloud container clusters update [CLUSTER_NAME] --no-enable-network-policy
22 changes: 22 additions & 0 deletions k8s/network/egress-block.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: deny-egress-traffic
namespace: ballerina-playground-v2
spec:
policyTypes:
- Egress
podSelector:
matchLabels:
app: ballerina-playground-executor
egress:
- to:
- podSelector:
matchLabels:
app: ballerina-playground-controller
- ports:
- port: 53
protocol: TCP
- port: 53
protocol: UDP

0 comments on commit a782b25

Please sign in to comment.