"Terror threatens us everywhere, and there is no absolute protection against terrorist attacks. This we had to learn in a very painful way," Steinmeier told soldiers at the German base. "The people in Kunduz and elsewhere in Afghanistan are counting on it that we will stand beside them. We will keep our word, and continue to support them in rebuilding this country."
Steinmeier later met in Kabul with President Hamid Karzai, who has condemned the bombing.
Reports said the May 19 attack occurred after German vehicles stopped at a market so soldiers could go shopping.
Seven Afghan civilians were also killed and at least two other German soldiers were wounded.
Meanwhile, Canadian Prime Minister Stephen Harper has made a surprise visit to Afghanistan.
Reports say Harper arrived in Kabul on May 20, visited a school for underprivileged children, and met with Karzai.
(AP, AFP, dpa)