Ryan, 30, stayed in during the at-bat and singled off Royals starter Jonathan Sanchez, then scored on a triple by Casper Wells as the Mariners jumped to a quick seven-run lead on the way to a 9-4 victory.
But Ryan was replaced on defense in the bottom of the second by utility infielder Munenori Kawasaki, who went 1-for-2 with a walk and run scored.
"It's a pretty good bruise," said manager Eric Wedge. "He fouled a ball off his foot in batting practice and then really nailed his knee there on that one. It wasn't going to do anything but get worse. If we'd tried to push him through tonight, he's probably not going to be available tomorrow or maybe even the next day. So he came in and got treatment the whole game."
Ryan is hitting just .186 on the season, but he is regarded as one of the American League's premier defensive shortstops. He leads all AL shortstops with a .994 fielding percentage and a 14.4 UZR rating.