While k8s's code is atrocious, I wonder if that isn't due to its legacy translation from Java (iirc, it was written in it initially)
It’s just ugly because that’s how it evolved after a community formed and that’s what real evolved software looks like. :)