How big is your bucket? Sounds like maybe you are using a generic 5 gallon bucket, for a 5 gallon batch. If you are brewing 5 gallons of beer, you should have a 6.5 gallon bucket with a lid, with a hole/grommet that accommodates an airlock. If you are just setting the lid on and it the krausen from the yeast is overflowing the top of the bucket - you are doing it wrong.