If the mold is white then don’t panic! White mold is good, and is a sign of a successful bin with healthy microbes and fungi.
If the mold is black, blue or green mold then this is a sure sign of a failed batch of pre-compost, and it should be discarded. Be sure to see that your lid is tightly sealing itself, the kitchen composter is not cracked, and that the drain spigot is kept closed. As well, it’s likely that not enough bokashi bran was added to the food scraps, or mixed evenly enough throughout the food scraps.
Take a look at this post for more information about mold in your bokashi bucket https://bokashiliving.com/mold-in-your-bokashi-bucket/