How granular should Cilium network policies be in a new cluster?

0
0
Asked By MellowCedar42 On

I'm building a new Kubernetes cluster and want to improve its network security without creating an unmanageable number of policies. Each application runs in its own namespace, and those namespaces are managed through FluxCD. Should I define policies for every individual pod and traffic flow, or is namespace-level isolation with selected port restrictions usually enough? Also, should system namespaces be covered by network policies, and are there practical guidelines for keeping the policy set maintainable?

1 Answer

Answered By OrbitingPanda7 On

A good starting point is default-deny for ingress and egress, then explicitly allow only the traffic each workload needs. Use stable identities such as namespaces, labels, and service accounts rather than targeting individual pod names, since pods are replaced frequently. You usually don't need a separate policy for every pod-to-pod flow; define policies around application communication boundaries and required ports, then refine them as you observe real traffic. System namespaces should be considered too, but apply policies carefully because components such as DNS, metrics, ingress, and the control-plane integrations need specific access. Start with the essential platform flows, test in a non-production environment, and manage the policies alongside the applications in GitOps.

MellowCedar42 -

That makes sense. I was mainly worried that default-deny would turn into dozens of tiny policies, so grouping rules by application role and namespace sounds more manageable.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.