I suggest that you ask early in student teaching for letters. Realize that everyone you are working with from your master teacher, grade level team, faculty advisor, professors, and administrators are all possible letter sources. Ask early, they have busy schedules of their own.
At my first placement, I had a meeting with the principal before I ever started to introduce myself as suggested by my University Advisor. I encourage you to do the same to get to know them and the school. They know you need letters, asking for one isn’t going to shock them. While in this meeting, let them know that you are interested in having them come out and observe a lesson so that they can write you an honest letter of recommendation.
If you are checking out multiple schools for possible placements I suggest talking with the administration about letters right at the start. Obviously, they need to see you in action but it is important to make sure they don’t have a blanket policy against writing letters for student teachers. Yes, that is a thing I have come across. If the administration denies all letter requests before ever seeing a student teacher in action, I suggest finding a different school. Teachers regularly need letters from administrators to apply for jobs and if all your placements were at schools with an auto “No.” policy then you might be in a hard place for finding a job.
That all being said, admins are busy people with quite a bit on their plate so if they aren’t able to write you a letter don’t fret. Ask your master teacher, your professors, your academic advisor and even just a status letter from your university about your expected graduation and recommendation dates. And never underestimate the influence of just word of mouth. If you really like a school or district, let them know it.