Kompany began his managerial career with Anderlecht – the club where he also started his playing career.
He led them to the Belgian Cup final in 2021-22 before leaving at the end of that season to take the reins at Burnley.
After guiding the Clarets to the Championship title with 101 points and securing promotion to the Premier League in his first season, Kompany was unable to avoid an immediate return to the second tier as they finished 19th last term.
Bayern finished third in the Bundesliga last term, halting their run of 11 successive titles as they fell 18 points short of champions Bayer Leverkusen.
The Bavarian outfit ended a campaign without a trophy for the first time since 2011-12.
“I’m eternally motivated, I wake up from the morning to the evening motivated with the intention to make everyone around me better,” added Kompany.
“I’m not defined by the successful years in my life, it’s the moments I had tough times.
“I don’t want to be successful on my own I want to bring as many people with me, that’s in my nature.”