We apply general relativity to construct the post-Newtonian background manifold that serves as a reference spacetime in relativistic geodesy for conducting relativistic calculation of the geoid's undulation and the deflection of the plumb line from the vertical. We chose an axisymmetric ellipsoidal body made up of perfect homogeneous fluid uniformly rotating around a fixed axis, as a source generating the reference geometry of the background manifold through Einstein's equations. We, then, reformulate and extend hydrodynamic calculations of rotating fluids done by a number of previous researchers for astrophysical applications to the realm of relativistic geodesy to set up algebraic equations defining the shape of the post-Newtonian reference ellipsoid. To complete this task, we explicitly perform all integrals characterizing gravitational field potentials inside the fluid body and represent them in terms of the elementary functions depending on the eccentricity of the ellipsoid. We fully explore the coordinate (gauge) freedom of the equations describing the post-Newtonian ellipsoid and demonstrate that the fractional deviation of the post-Newtonian level surface from the Maclaurin ellipsoid can be made much smaller than the previously anticipated estimate based on the astrophysical application of the coordinate gauge advocated by Bardeen and Chandrasekhar. We also derive the gauge-invariant relations of the post-Newtonian mass and the constant angular velocity of the rotating fluid with the parameters characterizing the shape of the post-Newtonian ellipsoid including its eccentricity, a semiminor and a semimajor axes. We formulate the post-Newtonian theorems of Pizzetti and Clairaut that are used in geodesy to connect the geometric parameters of the reference ellipsoid to the physically measurable force of gravity at the pole and equator of the ellipsoid. Finally, we expand the post-Newtonian geodetic equations describing the post-Newtonian ellipsoid to the Taylor series with respect to the eccentricity of the ellipsoid and discuss their practical applications for geodetic constants and relations adopted in fundamental astronomy.