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

Commit

Permalink
Prevent outbound traffic from executors
Browse files Browse the repository at this point in the history
  • Loading branch information
kaviththiranga committed Nov 22, 2019
1 parent 215c6c1 commit d91b774
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 d91b774

Please sign in to comment.