Background: Ground-state spins and magnetic moments are sensitive to the nuclear wave function, thus they are powerful probes to study the nuclear structure of isotopes far from stability.Purpose: Extend our knowledge about the evolution of the 1/2 + and 3/2 + states for K isotopes beyond the N = 28 shell gap.Method: High-resolution collinear laser spectroscopy on bunched atomic beams.Results: From measured hyperfine structure spectra of K isotopes, nuclear spins and magnetic moments of the ground states were obtained for isotopes from N = 19 up to N = 32. In order to draw conclusions about the composition of the wave functions and the occupation of the levels, the experimental data were compared to shell-model calculations using SDPF-NR and SDPF-U effective interactions. In addition, a detailed discussion about the evolution of the gap between proton 1d 3/2 and 2s 1/2 in the shell model and ab initio framework is also presented.