Consider a sphere of radius a centered at origin. The electric field at the surface, area vector and electric field vector are parallel.
\[\Rightarrow \phi _{total} =\int \vec{E}.d\vec{A} =E\int dA=(ka)(4\pi a^{2})=4k\pi a^{3}\]
\[By \ Gauss\ law \phi =\frac{q}{\varepsilon _{0}}\]
\[\Rightarrow q=4k\varepsilon _{0}\pi a^{3}\]