J.K. Rowling used Kathleen for the K initial in her pen name.
Her birth name was Joanne Rowling, and she did not have a middle name. Bloomsbury asked her to use initials because publishers believed a gender-neutral author name might appeal to boys. Rowling chose K in honor of her paternal grandmother, Kathleen Ada Bulgen.
The author became known publicly as J.K. Rowling, although the name does not represent two given names from her birth certificate. This detail is often misremembered as Katherine or another common form of Kathleen. The initial was a publishing choice combined with a family tribute.
Rowling’s later crime novels used the separate name Robert Galbraith. That pseudonym has no connection to the K in J.K. Rowling. The distinction between her birth name, her familiar publishing name and her later pseudonym explains why biographical accounts may list several different author names.