Monday's draw put Brazil, who won the Confederations Cup in 1997, in Group B with Japan, Mexico and Greece while Germany are joined in Group A by Tunisia and Australia plus Argentina.
The German organisers of the tournament starting on June 15 are hoping it will be a test run for the 2006 World Cup finals.
"We're delighted to be pitted against Brazil," said Greece coach Otto Rehhagel after the draw made in the Alte Oper opera. "Brazil are the standard everything is measured by. It's going to be a highlight. We've already showed nothing is impossible."
Germany coach Juergen Klinsmann, whose side meet Australia on the first day of the two-week tournament a year before the World Cup, said he was looking forward to competitive matches for his team, otherwise limited to friendlies ahead of 2006.
"It's going to be a good audition for the World Cup for us," said Klinsmann, whose team qualify for the World Cup as hosts.
"We're trying to improve with each friendly. We're happy to be in the opening match against Australia. They have a good team, with good players all over Europe, especially in the (English) Premier League."
The Confederations Cup final is set for June 29 in Frankfurt and other venues are Hanover, Cologne, Leipzig and Nuremberg.
France won the past two tournaments, retaining their crown in 2003 by beating Cameroon in the final at the Stade de France.
More from rediff