How to find the sharp constant between norms?

How to prove that $$\|u\|_\infty\leq C_p\|u'\|_{L^p},\ \forall\ u\in W^{1,p},\ u(0)=u(T)$$ with $$\int_0^T u=0$$ and $$C_p=\frac{1}{2}\left[\frac{T(p-1)}{2p-1}\right]^{\frac{p-1}{p}}$$?

It is easy to show that $$\|u\|_\infty\leq T^{\frac{p-1}{p}}\|u'\|_{L^p}$$, but $$C_p$$ is a sharp constant.