On the basis of experimental observations, it has been suggested that glycolytic oscillations underlie the pulsatile secretion of insulin by pancreatic beta cells, with a periodicity of about 13 min. If beta cells within an islet are synchronized through gap junctions, the question arises as to how beta cells located in different islets of Langerhans synchronize to produce oscillations in plasma levels of insulin. We address this question by means of a minimal model that incorporates the secretion of insulin by cells undergoing glycolytic oscillations. Global coupling and synchronization result from the inhibition exerted by insulin on the production of glucose, which serves as the substrate for metabolic oscillations. Glycolytic oscillations are described by a simple two-variable model centered on the product-activated reaction catalyzed by the allosteric enzyme phosphofructokinase. We obtain bifurcation diagrams for the cases in which insulin secretion is controlled solely by the product or by the substrate of the metabolic oscillator. Remarkably, we find that the oscillating cells in these conditions synchronize, respectively, in phase or out of phase. Numerical simulations show that in-phase and out-of-phase synchronization can sometimes coexist when insulin release is controlled by both the substrate and the product of the metabolic oscillator. The results provide an example of a system in which the selection of in-phase or out-of-phase synchronization is governed by the nature of the coupling between the intracellular oscillations and the secretion of the biochemical signal through which the oscillating cells are globally coupled.