I Learned Go in 3 Weeks. Yesterday, My Code Merged into k9s
Description and use
k9s fixed port‑forward authorization by checking both create and get verbs for SPDY and WebSocket, restoring functionality for users with limited RBAC.
Problem
k9s incorrectly checked only the create verb for pod port‑forwarding, blocking users with get‑only RBAC on Kubernetes 1.31+ WebSocket path.
Outcome
k9s now correctly authorizes port‑forwarding for both SPDY and WebSocket paths, restoring functionality for users with get‑only RBAC and maintaining backward compatibility.
Workflow
- Read issue #4144 and reproduction steps
- Read k9s source and tests to understand current logic
- Learned HTTP/1.1 upgrade vs WebSocket protocol differences
- Implemented dual verb check in
port_forwarder.go - Added comprehensive test suite covering all permission combinations
- Ran
go test -raceto catch data races - Submitted PR and iterated through review rounds
- Merged PR within 48 hours
Evidence
I changed one word and called it a day… I replaced one hardcoded verb with another…
The error was a data race in the mock client…
I didn’t know what an HTTP/1.1 Upgrade was…
- Record date: 2026-09-06T09:22:22.530Z