Guardiola signed a new contract last year until 2021, but reports earlier this month suggested that the deal included an option to depart 12 months early - something he has denied.
Former City captain Kompany told Sky Sports: "If I was in a deciding position at City now, [then] I would do everything I can to keep Pep [Guardiola] for as long as I can. He is truly the best.
"To say anyone will ever come near, it is speculating in a ludicrous way."
Asked about succeeding Guardiola, he added: "I am not thinking about that."