A great way to remember which ending to use is by remembering “Milk Truck”.
In the word milk, the vowel (i) is followed by a consonant (l). In this case, we would spell the /k/ sound with the letter k.
In the word truck, the vowel (u) is not followed by any consonants. In this case, we would spell the /k/ sound with the letters ck.