Skip to content

Instantly share code, notes, and snippets.

@onefoursix
Last active October 15, 2024 17:50
Show Gist options
  • Save onefoursix/8a8683818a5c6fa844403bbf2ffc4c8c to your computer and use it in GitHub Desktop.
Save onefoursix/8a8683818a5c6fa844403bbf2ffc4c8c to your computer and use it in GitHub Desktop.
Cilium Network Policy for IBM StreamSets Agent
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: cnp-streamsets-agent
namespace: <your namespace>
spec:
endpointSelector:
matchLabels:
"streamsets": agent
egress:
# Allow egress to matched StreamSets Control Hub
- toFQDNs:
- matchName: <your Control Hub URL>
toPorts:
- ports:
- port: "443"
protocol: TCP
# Allow egress to kube-dns
- toEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": kube-system
"k8s:k8s-app": kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
rules:
dns:
- matchPattern: "*"
# Allow egress to kube-apiserver
- toEntities:
- kube-apiserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment