Kubernetes v1.38 drops kubectl WebSocket opt-out variables and the kuberc name field
The Kubernetes project has published a preview of changes planned for version 1.38, including two removals affecting kubectl: the environment variables that disable WebSockets and the name field in kuberc credential plugin allowlist entries. Cluster administrators and teams maintaining scripts or CI pipelines that call kubectl are concerned.
What to do now
The Kubernetes release team has outlined on the project blog a set of changes planned for version 1.38. It stresses that the list reflects the current state of the release and may change before it ships; the post does not give a release date.
The first change removes two kubectl environment variables, KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS. kubectl has defaulted to WebSockets instead of SPDY for exec, attach and cp since v1.30, and for port-forward since v1.31, and these variables were the way to switch that off. From v1.38 they will be ignored: kubectl will always try WebSockets first and fall back to SPDY when needed, which is already the default today. Scripts and CI environments that set them can drop them. KEP-4006 covers the background.
The second change concerns kuberc, the file that keeps kubectl user preferences apart from the credentials held in kubeconfig. Among other things it holds an allowlist of credential plugins kubectl may run. In the beta kubectl.config.k8s.io/v1beta1 API, an allowlist entry can use name as an alias for command, and that name field has been deprecated since v1.36.
kuberc is expected to reach stable in v1.38, and the new kubectl.config.k8s.io/v1 API will not include name. The project advises switching any entries that use name over to command now. KEP-3104 describes the preferences separation work.
Beyond these two items in the available excerpt, the post as provided does not detail further changes or a firm release timeline.
What to do now
- Search scripts, CI pipelines and tooling images for KUBECTL_REMOTE_COMMAND_WEBSOCKETS or KUBECTL_PORT_FORWARD_WEBSOCKETS and remove them.
- Review kuberc files on workstations and service accounts and replace name with command in credential plugin allowlist entries.
- Confirm that any tooling that relied on forcing SPDY works with kubectl's default WebSocket behaviour.
- Track the official Kubernetes v1.38 release notes, since the announced changes may still shift before release.