We present JHK photometry and light curves for a sample of cepheids in the two LMC young clusters NGC 1866 and NGC 2031. The reduced amplitude and dependence on metallicity allow us to derive precise mean magnitudes and to draw well defined P-L relations, which we find in good agreement with the P-L relation obtained in the IR for field cepheids.