I'll talk with respect to India. A bunch of dominant caste (including a decent chunk of middle caste and uplifted/politically represented lower castes) folks rent houses, of which, the upper castes are simply the worst kind of landlords.
A small minority of them don't discriminate, or disregard this, when money is involved. But most still do.
How exactly? They ask for your full government name - your surname speaks about your caste. But that would be really rude in the 21st century, right? How exactly do they mask casteism then?
Convey your caste using a lifestyle - "Oh, sorry, we don't allow non-vegetarians". This was literally our personal experience, especially in Mysuru, for the first time in my life. I was left stunned. And mind you, these people are educated, and have great jobs in the public sector.
In the Hindi-speaking belt, they are even more direct about their bigotry: "We only allow people who come from अच्छे घराने (acche gharane, meaning good families)". But you already know who the good, well-mannered families are, don't you?
It is, and there are laws to prevent this. But what's even the point, when these laws are not enforced properly? And even if someone were to sue, there's too many cases pending. Our courts are overburdened. Filing a police complaint is pointless.