Those expressions are used quite a bit in Germany - you're right!
"Alles klar" can be either used as a greeting or a statement/confirmation. Find two examples here:
1. Greeting: Alles klar bei dir? or Alles klar? - Everything ok (with you)?
You could answer that with: Ja, alles klar. - Yes, everything's ok.
2. Statement/confirmation: Alles klar. - Ok, got it. (Used when you want to express you understood something)
"Alles gut" is mostly used as a greeting (similar to "Alles klar"):
Alles gut? - Everything good?
Answer: Ja, alles gut. - Yes, Everything's good.
Does that make it clearer?