Skip to content

Instantly share code, notes, and snippets.

@miluna
Created December 2, 2021 15:00
Show Gist options
  • Save miluna/fa5e78ddb9a5303d0791515ee65469ac to your computer and use it in GitHub Desktop.
Save miluna/fa5e78ddb9a5303d0791515ee65469ac to your computer and use it in GitHub Desktop.
Sample Kubernetes Networkpolicy yml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: <external-access-name>
spec:
ingress:
- ports:
- port: 8080
protocol: TCP
podSelector:
matchLabels:
app: <ms-name>
policyTypes:
- Ingress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment