I am replacing a kitchen fixture and I can't turn it off with the existing switch

The ceiling box has two wires going in. a black and white, as well as a black, white and red.

I did not connect...