Created
May 31, 2024 15:04
-
-
Save chadmcrowell/b79af57d9b8ef0d52317e9b3c7f92712 to your computer and use it in GitHub Desktop.
Define cilium network policy to enforce L7 policies
This file contains hidden or 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
apiVersion: cilium.io/v2 | |
kind: CiliumNetworkPolicy | |
metadata: | |
name: my-app-policy | |
namespace: default | |
spec: | |
endpointSelector: | |
matchLabels: | |
app: my-app | |
ingress: | |
- fromEndpoints: | |
- matchLabels: | |
app: allowed-app | |
egress: | |
- toEndpoints: | |
- matchLabels: | |
app: external-service | |
l7Rules: | |
http: | |
- method: "GET" | |
path: "/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment