Phased-array modules at frequencies >20 GHz are expected to play an important role for 5G applications. Antenna-in-package (AiP) is a reliable and cost-effective method to realize these phased arrays. This paper introduces a practical Ka-band AiP structure and discusses the antenna element design and implementation tradeoffs. The AiP design is based on multilayer organic buildup substrates that are suitable for phased-array module integration needs and supports both horizontal and vertical polarizations. Measurement results from the fabricated antenna prototypes show 0.8 GHz return loss bandwidth and 3.8-dBi peak gain at 30.5 GHz. Simulation results agree with the measured ones.