The innermost layers of the CMS tracker are built out of pixel detectors arranged in three barrel layers (BPIX) and two forward disks in each endcap (FPIX). The original CMS detector was designed for the nominal instantaneous LHC luminosity of 1 x 10^34 cm^-2 s^-1. Under the conditions expected in the coming years, which will see an increase of a factor two of the instantaneous luminosity, the CMS pixel detector will see a dynamic inefficiency caused by data losses due to buffer overflows. For this reason the CMS Collaboration has installed during the recent extended end of year shutdown a replacement pixel detector. The Phase I upgrade of the CMS pixel detector will operate at full efficiency at an instantaneous luminosity of 2 x 10^34 cm^-2 s^-1 with increased detector acceptance and additional redundancy for the tracking, while at the same time reducing the material budget. These goals are achieved using a new readout chip and modified powering and readout schemes, one additional tracking layer both in the barrel and in the disks, and new detector supports including a CO2 based evaporative cooling system, that contribute to the reduction of the material in the tracking volume. This contribution will review the design and technological choices of the Phase I detector, with a focus on the challenges and difficulties encountered, as well as the lessons learned for future upgrades.