There was a class system in Ancient Egypt, but it wasn't a strict caste system. People could move from one class to another by being talented or smart. In India, there was no way to move from one caste to another. That is the main difference between a class system and a caste system. Class is more informal and fluid, castes are formal.
It is difficult to find similarities between Indian and Egyptian/Mesopotamian social structure other than the fact that social distinction did, in fact, exist.
In Egyptian civilization, there was no noble class; there was the Pharaoh, the priestly class, and everyone else. The Pharaoh was at the pinnacle of this simplistic pyramid. He was considered the earthly manifestation of the sun god, Horus, and was largely believed to be responsible for the annual flooding of the Nile on which Egyptian civilization was dependent. He was never seen in public, and it was dangerous to even look upon him. To touch his person was a crime punishable by death, unless one were specifically directed by the Pharaoh to touch him.It should be noted that Egyptian civilization was patriarchal; that is largely male dominated and oriented; however it was also matrilineal; ones heritage was traced through the mother's line, not the fathers. Interestingly, the pharaoh often referred to his wife as his "sister." There is no clear evidence that an incestuous relationship existed, although the literature seems to suggest as much.
Mesopotamian civilization was much more stratified than the Egyptian, but there was no religious element as in the caste system of India, and kings were not considered Gods. Social status was apparently determined by wealth--or lack thereof. Leaders were originally chosen because of military prowess; but later their position became inherited. At the top of the social scale were kings and also noblemen. Next were the priests and priestesses to the Mesopotamian Gods, such as Baal and Astarte. They were normally members of the noble class who were second or third born, and therefore not likely to inherit the noble title. Next were free commoners, then dependent commoners (basically tenant farmers) and at the bottom were slaves, normally prisoners of war, criminals, or debtors who sold themselves into slavery.
The Caste system was determined by birth; wealth was not an element. It was believed to be necessary to preserve stability in society. Caste was determined at birth, and although some social mobility was possible, it was generally unlikely. One was born and died within his caste. Although sub-castes known as jati later developed, early Aryan Indian society recognized four castes: The Brahmins (Priests); kshatriyas, (warriors and aristocrats); vaishas, (farmers, artisans and merchants); and shudras, (landless peasants and serfs.) The untouchables, a fifth class, developed later. Unlike the previous two societies, the caste system was based on religious belief and practice. Wealth rather than religion determined Mesopotamian status, and the Pharaoh in Egypt, considered a god on earth, was literally in a class by himself.