It s really pretty simple. Kindergarten registration is by school district, not building. Count the available kindergarten teachers, classrooms and students. Divide one by the other. Assign students so that number becomes the cap on students per classroom.
Every kindergarten has exactly the same number of students.
Once in, they re guaranteed K-6 in that school. But any student who later transfers into a higher grade gets assigned to the school with the smallest class. Lots of variations are possible. To ease transfers, neighboring schools can be clustered. Three or four buildings operated as one school with a distributed campus.