Energy-efficient communications, namely, green communications, has attracted increasing attention due to energy shortage and greenhouse effect. Motivated by this, we consider the uplink energy-efficient resource allocation in multiuser massive multiple-input multiple-output (MIMO) systems. Specifically, we consider that both the number of antenna arrays at the base station (BS) and the transmit data rate at UE are adjusted adaptively to maximize the energy efficiency. Firstly, we demonstrate the existence of a unique resource allocation solution that is globally optimal by exploiting the properties of objective function. Then we develop an iterative algorithm to solve it. By transforming the originally fractional optimization problem into an equivalent subtractive form using the properties of fractional programming, we develop another efficient iterative resource allocation algorithm. Simulation results have validated the effectiveness of the proposed two algorithms and have shown that both algorithms can fast converge to a near-optimal solution in a small number of iterations.