A probably essential, minor shell protein of the carboxysome, a polyhedral inclusion where RuBisCO (ribulose bisphosphate carboxylase, rbcL-rbcS) is sequestered. Hexamers form sheets that form the facets of the polyhedral carboxysome. In PCC 7418 there are several CcmK paralogs with presumably functional differences. This subunit can probably make both homohexamers and heterohexamers with CcmK3. Both hexamers can also make dodecamers, formation depends on buffer conditions. Crystallizes as a homohexamer. Interacts stably with CcmK3, forming heterohexamers that can make dodecamers. Heterohexamers have a 1:2 CcmK3:CcmK4 stoichiometry. Upon expression in E.coli forms large aggregates. This cyanobacterium makes beta-type carboxysomes. The tight homohexamer forms a small pore which is positively charged. Belongs to the bacterial microcompartments protein family. CcmK subfamily.