Kubernetes manifests · Services and Ingress

Deny all ingress traffic by default

Block all incoming traffic to pods in a namespace, then allow what you need.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-ingress
spec:
  podSelector: {}
  policyTypes:
    - Ingress

Official Kubernetes manifests documentation

More services and ingress commands

All services and ingress commands · Kubernetes manifests cheatsheet

Was this page helpful?