Yolanda Foster didn't want to be treated like a second class citizen on 'Real Housewives of Beverly Hills' -- and decided to leave the show rather than be demoted from the main cast ... TMZ has learned.
Foster announced she was leaving the show in an Instagram statement -- and implied that she was fired.
But our production sources say that's not exactly the case ... telling us Yolanda was offered a role as a "friend of the cast" -- which would give her more free time to address her health issues.
We're told Yolanda saw the move as a demotion -- since she was a full-fledged cast member in the past few seasons -- and refused to take a lesser role.
Our sources say Bravo isn't bitter about the split -- and has let Yolanda know she is still welcome to appear on future episodes ... as a friend.