From US military slang, possibly from German klug, or perhaps from Dutch Low Saxon klütje, Jutland Danish klyt ("piece of bad workmanship, klud(g)e"); compare and standard Danish kludder ("mess, disorder"). (Compare klutz.)
According to the OED, an "invented word" influenced by bodge and fudge.