No, there is no universal obligation to have health insurance, but there are many circumstances triggering an obligation, essentially rendering it a universal obligation.
Specifically see § 5 SGB Ⅴ:
§ 5 Obligatory Insurance
⑴ Subject to compulsory insurance are
9. students enrolled at a state college or college recognized by the state, regardless of having settled or maintaining habitual residence within Germany, provided they are not eligible for performance in kind on grounds of super- or intergovernmental agreements, until completion of their 30th year; […]
Colleges usually request a confirmation by your health insurance that you are insured, § 199a ⑵ SGB Ⅴ.
If your college did not ask you for such form, it might be possible you do not have to take out insurance.
German social law is just a complete and utter clusterfuck.
Frequently legal rules have exemptions, which then have counter exemptions having counter exemptions on themselves.
We cannot give you an ultimate answer without knowing all pertinent details.
Therefore I recommend asking your college (maybe they have an international office familiar with such issue).
The DAAD suggest this too.
Or consult an insurance provider in Germany;
they know to ask “the right questions” (with respect to possibly applicable exemptions and counter exemptions).