Is the kinetic gas equation valid for non-cubical containers?

I have seen the derivation of the following equation for a cubical container with $N$ molecules.


$$PV = \frac 13 mNu^2 $$


How is this equation valid even for spherical container or any other non cubical shaped container?


(I prefer rigorous equation-based proof but I'm okay even with analytical proof )


