Deutsche/r/n/m are nounified adjectives. The ending depends on the ending of the adjective which depends on the gender and the preceding article which may be definite or indefinite... in your case it is indefinite as musiKk pointed out ... eine/r/m/n

No, adjectives do not have a gender. But they adapt to the gender of the noun they refer to(*):

Ein deutscher Freund. Eine deutsche Freundin. Ein deutsches Mädchen.

In your case, as both other answers already pointed out, it is a conversion from adjective to noun. Since the word isn't an adjective any more but a noun it needs an article. You take the article of the omitted noun:

"Markus ist Deutscher" follows the same pattern as "Markus ist Maler" (Markus is a painter) or "Markus ist Bauer" (Markus is a farmer). So "Deutscher" is not an adjective, but a noun, and nouns have a gender. And nouns are written with uppercase first letter, which is not true for adjectives.

You can also use this examples with an article: "Markus ist ein Deutscher", "Markus ist ein Maler" or "Markus ist ein Bauer".