"Kanaka" is Hawaiian for man, and thus became slang among English-speaking traveling men for a Hawaiian man.
Kipling did indeed use "rookie"; indeed, the OED's earliest citation is from him (1892). It may be worn down from "recruitie", which also occurs in Kipling.