Yes, they both mean ,,the." They are used in different places. Most of the time, Ke is used before K,E,A, or O, while Ka is used in most other places.
Think of the words: Ke ao. The cloud. It tells you which letters to use Ke with, while also using Ke.