Allertova, ranked 64th in the world, posted a 7-5, 7-5 victory over No. 2 Kerber to reach the third round. Allertova ended the match by winning the final four games.
Kerber was occasionally hindered by an injury to her left thigh as she was eliminated in the second round at Indian Wells for the third straight year.
"Actually, she was playing not bad today, you know," Kerber told reporters. "I was trying to find my rhythm and trying to play my game, but, yeah, it was not my day.
"My leg was bothering me in the last few days already, so I was taping it and I was trying it. It will be helping a little bit, but at the end the match I was feeling it a little bit more.
"But it's not the excuse that's why I lost the match."
The victory is one of the biggest ever for Allertova, a 23-year-old Czech playing in the main draw at the Southern California resort for the first time.
"I tried to focus on every shot, play into the court and just play my best," said Allertova, who will face Great Britain's Johanna Konta in the third round.
Allertova finished off Kerber in only 98 minutes.
Kerber has struggled since winning the Australian Open. The 28-year-old German didn't record a single ace in her disappointing setback against Allertova.
"The pressure is much different than it was a few months ago," Kerber said. "I will try to learn from this experience. It was a busy week for me. It is a new situation I have to try to get used to."
Konta rolled to a 6-4, 6-0 victory over American Madison Brengle. She won the final eight games of the match.
In other women's matches, Switzerland's Timea Bacdinszky defeated Bulgaria's Tavetana Pironkova 6-2, 6-1; Italy's Roberta Vinci beat Russia's Margarita Gasparyan 6-3, 6-7(7), 7-6(5); Puerto Rico's Monica Puig ousted Slovakia's Anna Karolina Schmiedlova 6-1, 6-2; Slovakia's Magdalena Rybarikova knocked off Australian Daria Gavrilova 2-6, 7-5, 6-4, and Switzerland's Belinda Bencic was a 6-3, 3-6, 6-3 winner over American Laura Davis.
On the men's side, eighth-seeded Richard Gasquet recorded a 6-4, 6-1 victory over fellow Frenchman Nicolas Mahut.
Canadian Milos Raonic was a 6-1, 6-3 winner over Spain's Inigo Cervantes 6-1, 6-3. This is Raonic's first tournament since sustaining a torn adductor during his run to the Australian Open semifinals.
In other matches, France's Gael Monfils beat Spain's Pablo Carreno Busta 7-5, 7-6 (1); Argentina's Federico Delbonis knocked off Portugal's Joao Sousa 7-6 (6), 6-4, and Ukraine's Alexandr Dolgopolov defeated Robin Haase of the Netherlands 6-4, 6-2.