How to Use Mixed Version Proxy for Safer Kubernetes Upgrades

By

Introduction

Upgrading a Kubernetes cluster with multiple control plane nodes can be risky. When API servers run different versions, some may not recognize newer resources, causing requests to fail with a 404 Not Found error—even though those resources exist on other nodes. This can lead to unintended garbage collection or blocking namespace deletions. The Mixed Version Proxy (MVP), now beta in Kubernetes 1.36, solves this by routing requests to the correct API server. This guide walks you through leveraging MVP to make cluster upgrades safer and more reliable.

How to Use Mixed Version Proxy for Safer Kubernetes Upgrades

What You Need

Step-by-Step Guide

Step 1: Verify That Mixed Version Proxy Is Active

In Kubernetes 1.36, MVP is enabled by default via the UnknownVersionInteroperabilityProxy feature gate. To confirm it’s running, check the API server logs or use the following command on any control plane node:

kubectl get --raw /readyz?verbose

Look for a line indicating the proxy is active. You can also inspect the kube-apiserver pod logs for messages like "MixedVersionProxy: proxying request to peer". If MVP is not found, ensure your cluster is on version 1.36 or later.

Step 2: Understand How MVP Routes Requests

MVP works by using Aggregated Discovery (replacing the older StorageVersion API). Each API server maintains a cache of what resources its peers serve. When a request arrives for a resource the local server doesn’t recognize, it:

  1. Checks its discovery cache for a peer that can serve the resource.
  2. Proxies the request to that peer, adding an x-kubernetes-peer-proxied header.
  3. Returns the response to the client as if it came from the original server.

This works for resource requests (e.g., GET /apis/batch/v1/jobs) but not for discovery requests (that limitation is addressed in future releases).

Step 3: Simulate an Upgrade Scenario

To test MVP, perform a rolling upgrade of your control plane nodes:

Without MVP, you would see a 404. With MVP, the request should succeed. Use kubectl —server=https://old-server:6443 get ... to force a request to the old server and verify.

Step 4: Monitor Proxy Activity and Logs

Enable verbose logging on the API server to track proxied requests. Add the flag —v=4 or higher to the kube-apiserver startup parameters. Look for log entries containing "proxying" or "peer-proxied". For example:

I0415 12:34:56.789012   12345 proxy.go:200] Proxying request for resource v2 to peer at 10.0.0.2:6443

You can also check metrics (if enabled) for proxy counts using the kubernetes_build_info metric.

Step 5: Troubleshoot Common Issues

If MVP is not working as expected, check these areas:

Step 6: Plan for Future Upgrades

With MVP enabled by default in 1.36, you can safely perform rolling upgrades without worrying about broken resource requests. However, be aware of the following:

Tips and Best Practices

Here are final pointers to get the most out of Mixed Version Proxy:

By following these steps, you can leverage Kubernetes’ Mixed Version Proxy to make cluster upgrades smoother and avoid the dreaded 404 errors that can disrupt operations.

Tags:

Related Articles

Recommended

Discover More

Grafana Launches AI-Powered Assistant for Rapid Database Performance TroubleshootingUnveiling PhantomRPC: 10 Critical Insights into Windows RPC Privilege EscalationBreaking: New Study Unveils Striking Genetic and Behavioral Divides Between Lions and Tigers10 Game-Changing Updates from the Swift Ecosystem: March 2026Outpacing AI-Driven Attacks: A Guide to Automated Exposure Validation