Scroll to top
© 2024, Global Digital Services LLC.

Kubernetes 1.31 Enhances Streaming with WebSocket Protocol Transition


Carlos Noguera - May 21, 2025 - 0 comments

Kubernetes has released version 1.31, significantly enhancing its streaming capabilities by shifting from the deprecated SPDY protocol to the more contemporary WebSocket protocol. This update improves both the performance and reliability of streaming APIs in the Kubernetes ecosystem.

This transition matters to developers and operators using commands like:

  • kubectl cp
  • kubectl attach
  • kubectl exec
  • kubectl port-forward

Previously, these commands could cause problems when working with modern proxies and gateways, since SPDY has fallen out of support for several years. The WebSocket protocol, being standardized and widely embraced, provides better compatibility and interoperability across a variety of components and programming languages.

In Kubernetes 1.31, WebSockets now serve as the default method for streaming connections. This modification allows for persistent, bi-directional connections that foster real-time data interaction. Such streaming connections are essential for operations requiring continuous communication between the client and the server, including executing commands in active containers.

To benefit from the new WebSocket streaming protocol, ensure both your cluster and kubectl are updated to version 1.29 or higher. Kubernetes 1.31 features gates that control streaming behavior, enabled by default, so you can take full advantage of this enhanced functionality without extra configuration.

This change reflects ongoing efforts to boost Kubernetes’ operational efficiency and improve user experience by moving away from outdated protocols. For comprehensive details about this transition, refer to the Kubernetes Enhancement Proposal (KEP) 4006, which outlines the specifics of the shift from SPDY to WebSockets.

For more information, visit the Kubernetes Blog.

Related posts