This repository has been archived by the owner on Apr 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent outbound traffic from executors
- Loading branch information
1 parent
215c6c1
commit d91b774
Showing
2 changed files
with
34 additions
and
0 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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 | ||
|