The 21-year-old will be unavailable for the event which takes place between June 17 and July 2 and will also miss the friendly in Denmark on June 6 and the World Cup qualifier at home to San Marino four days later.
Sane said in a statement on dfb.de: "I would have liked to have gone to Russia, but after talks with the medical team, I have decided to use the summer break for this operation so that I can go into the new season with a clean bill of health."
FIFA Confederations Cup
All doping tests at Confederations Cup negative - FIFA
24/07/2017 AT 13:40
Head coach Joachim Low selected seven uncapped players in his 23-man squad for the tournament in Russia, with the likes of Manuel Neuer, Mats Hummels, Mesut Ozil and Thomas Muller all omitted.
Sane was one of three Premier League-based players to be called up alongside Liverpool midfielder Emre Can and Arsenal defender Shkodran Mustafi and Low has until June 7 to submit a final squad to FIFA for the competition.
FIFA Confederations Cup
Low: New-look Germany the best in the world
02/07/2017 AT 22:24
FIFA Confederations Cup
Germany win another title amidst more VAR controversy
02/07/2017 AT 17:19