It spur my interest from other topic.
Scenario 1: You are buying in Cupertino school district (Cupertino / West Sunnyvale) for 2.5M house (3bed 2bath) and downpayment 550K. Table suggests your need to pay $11K per month.
Scenario 2: You are renting in Cupertino school district, but buy 2 rental property in Bay Area (Fremont, Daly City) with downpayment 550K. As table below, your out of pocket could be $1500, so you still got $9500 to spend on rent. Cupertino rent for 3 / 2 is about $4000 - $5500.
I can rent this house in Palo Alto for $7500, and I still came out ahead: https://www.zillow.com/homedetails/4239-Manuela-Ave-Palo-Alto-CA-94306/19526698_zpid/