The 33-year-old, who had a spell out of favour last spring and was left out of the starting line-up for the Champions League final in June, has agreed a two-year extension.
Walker had entered the final year of his existing deal when the Bundesliga champions came along with an attractive package but the England international ultimately decided to stay put.
“I’m thrilled to sign a new deal. My future is with Manchester City and that is the best thing for me,” said Walker, who has won 15 trophies with the club.
“I’ve enjoyed every single moment of the past six years at this fantastic club. The treble-winning season is one I will never forget and we’re ready to go again and try to win more trophies.
“We’ve got to demand that. We’ve set the bar and each year it’s how do you get better? How do we get better? We seem to be doing that each year. We’ve probably gone to the top of the top where there is only down because are we going to go and win a treble again? Who knows? You know, we could do.
“The odds say that we’re not going to, but we need to make sure that we’re there competing in the later stages in all competitions and fighting for the silverware.
“But I think one thing that we’ve done really well here is we take one game at a time. We don’t plan for the future. We plan for the present and the present starts on Saturday against West Ham.
“I am delighted to continue at a club that competes for trophies every year and I can’t wait to see what the next few years bring.”
Director of football Txiki Begiristain hailed a player he classed as the best right-back in the world.
“He is an outstanding footballer and his speed, strength and experience make him such an important member of our squad,” he said.
“For me, he is the best right-back in the world, a player with a unique set of attributes. He brings a very special dynamic to our team.
“Kyle has been a huge part of our recent success, and we are confident that he will help us compete for trophies in the upcoming seasons.”
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies