KFe2As2 is one of the representatives of iron-based superconductors. Many interesting features distinguish this compound from other iron-based superconductors, e.g., a realization of the Pauli limit or an occurrence of the superconducting gap with nodal lines. Moreover, with increasing pressure, the isostructural phase transition from the tetragonal to collapsed tetragonal phase is experimentally observed. We discuss the structural, electronic, and superconducting properties of the KFe2As2 under pressure using the ab initio density functional theory (DFT) methods. We analyze the untypical properties of this superconductor considering, among others, the Fermi surfaces or the dependence of the anion height from the iron layer on the superconducting critical temperature.