Skip to content
Middle+19 views

You mentioned a migration from one cluster to four based on domains. Please describe the network topology: how is communication between clusters organized, how did you solve the problem with pod IP addresses, which service discovery mechanism did you choose and why didn't you use a service mesh like Istio? What was the most challenging aspect of this migration from a network policy perspective?

Practice

Asked at

AI answer

As an example of this kind of migration, you could describe the architecture as follows—though the details should be checked against the team’s actual implementation.

Each cluster had its own non-overlapping Pod CIDR, and network routing between clusters was provided at the VPC/network level. This resolved the issue of duplicate pod IP addresses and made it possible to apply routing and traffic filtering predictably. Within a cluster, services were discovered through Kubernetes DNS; to call a service in another cluster, we used a stable internal DNS address pointing to that cluster’s private load balancer or ingress. This meant we did not rely on the standard service.namespace.svc name resolving automatically across clusters.

We did not introduce a service mesh because, at the time, network connectivity, DNS, and ingress were sufficient, while a mesh would have added operational complexity: a control plane, sidecar proxies, upgrades, and troubleshooting. Istio would have made sense if we had needed advanced L7 policies, mTLS between services, or application-level traffic management.

The most difficult part of network policies is usually not the basic prohibition on inter-cluster traffic, but compiling a complete list of required traffic flows: DNS, health checks, monitoring, CI/CD, and application egress requests. We started by inventorying dependencies, introduced policies gradually, and checked them against logs and metrics before enabling default-deny mode.

Also asked at .618

Similar questions