• TheVowelsOfX's Newsletter
  • Posts
  • Kubernetes 1.33 “Octarine”: Smarter Service Routing in Multi-Zone Clusters with PreferClose

Kubernetes 1.33 “Octarine”: Smarter Service Routing in Multi-Zone Clusters with PreferClose

Kubernetes 1.33 — nicknamed "Octarine" — brings a wealth of powerful, stability-graduated enhancements, and at the top of the list is groundbreaking improvements in service traffic efficiency across multi-zone clusters.

What’s New?

One major highlight: Topology-aware routing and traffic routing intelligence are officially generally available (GA) in Kubernetes 1.33. This allows services to direct traffic preferentially to endpoints within the same zone as the client Pod—dramatically cutting latency and cross-zone network costs.(Kubernetes)

Unpacking the PreferClose Feature

At the core of this innovation is the new trafficDistribution field, particularly with the PreferClose option:

By setting:

spec:
trafficDistribution: PreferClose

  • on a Service definition—and pairing it with the service.kubernetes.io/topology-mode: Auto annotation—Kubernetes will automatically guide service traffic toward endpoints in the same availability zone as the requesting Pod.

  • Under the hood, EndpointSlice hints (now GA since v1.33) contain topology metadata. Components like kube-proxy honor these hints to deliver traffic locally when possible.

Why It Matters: Real-World Benefits

  • Improved Performance: By keeping traffic local within zones, request latency drops — especially important for latency-sensitive applications.

  • Cost Efficiency: Cross-zone or cross-region data transfers often incur cloud egress charges. PreferClose helps minimize those.

  • Resilience with Fallback: If local endpoints aren’t available, traffic gracefully falls back to other zones — offering locality without sacrificing availability.

Reference Implementation Example

Here’s a minimal Service manifest example illustrating how to enable the feature:

apiVersion: v1
kind: Service
metadata:
  name: example-service
  annotations:
    service.kubernetes.io/topology-mode: "Auto"
spec:
  selector:
    app: my-app
  ports:
    - port: 80
      targetPort: 8080
  type: ClusterIP
  trafficDistribution: PreferClose

With this, Kubernetes handles the rest — endpoint hinting, proxy logic, and routing decisions — seamlessly.

Notable Caveats to Consider

  • Endpoint count matters: As per Kubernetes docs, topology-aware routing works best when there are multiple endpoints per zone—especially in clusters with 3+ zones. If there are too few endpoints per zone, hinting may be omitted or ineffective.(Kubernetes)

  • Configuration prerequisites:

    • The service.kubernetes.io/topology-mode: Auto annotation must be present.

    • EndpointSlice support is required (GA since earlier versions).

    • Ensure networking plugins and kube-proxy support topology hints.

  • For services using internalTrafficPolicy: Local, topology-aware routing won't apply.

📬 Stay Connected with The Vowels of X

At The Vowels of X, we share insights across three key verticals:

🛠️ DevOps — Tools, automation, CI/CD, observability
🚗 Automobile — Industry trends, mobility tech, and innovation
🏥 Healthcare — Digital health, AI in medicine, and tech infrastructure

If any of this interests you, stay in the loop:

🔁 Feel free to follow, share, and drop a comment if you found this useful!

Reply

or to participate.