We use an information-consistency or, equivalently, a thermodynamic equilibrium condition to derive Einstein’s equations, both in case of a gravitational and an electrostatic field. We thus show the equivalence of an information-theoretic and a thermodynamic viewpoint in the analysis of the geometry of space-time.