From Old Japanese, attested in the Kakyō Hyōshiki of 772 with the phonetic spelling 倶基. In turn, from Proto-Japonic *kukuy.
This word has an alternating form くく (kuku) which only occurs in compounds. For the reason of this vowel alternation, see WT:AJPX#Standalone forms and combining forms.