A preliminary 2.8 magnitude earthquake struck near Morgan Hill, according to the United States Geological Survey.