  We derive the Ks-band luminosity function (LF) of the z=1.237 massive X-ray
luminous cluster of galaxies RDCS J1252.9-2927. Photometric redshifts, derived
from deep multi-wavelength BVRIzJKs data, and calibrated using a large subset
of galaxies with spectroscopic redshifts, are used to separate the cluster
galaxy population from the foreground and background field galaxy population.
This allows for a simultaneous determination of the characteristic magnitude
Ks* and faint end slope alpha of the LF without having to make an uncertain
statistical background subtraction. The shape of the bright end of the derived
LF is similar to that measured at similar restframe wavelengths (in the z-band)
in local clusters, but the characteristic magnitude is brighter by Delta
Mz*=-1.40(+0.49/-0.58) magnitudes, suggesting that the massive cluster
ellipticals that dominate the bright end of the LF were already in place at
z=1.237. The derived alpha is shallower (at the 2.2 sigma level) than the value
measured in the z-band in clusters in the local universe, suggesting that RDCS
J1252.9-2927 contains a relatively smaller fraction of low mass galaxies than
clusters in the local universe. The results presented in this paper are a
challenge for semi analytical hierarchical models of galaxy formation which
predict the characteristic magnitude to grow fainter and the faint end slope to
steepen with redshift as the massive galaxies break up into their progenitors.
The observed evolution is consistent with a scenario in which clusters are
composed of a population of massive galaxies which formed at high redshift
(z>>1) and subsequently evolved passively, and a population of lower mass
galaxies which are gradually accreted from the field, primarily at lower
redshift (z<1). (Abridged)
