Injured Kaka undegoes surgery
The Spanish club said earlier on their website that Kaka had suspected meniscus damage and might need surgery.
GEAR: Get a Kaka shirt
He was examined in Belgium by knee and sports injury specialist Marc Martens, who carried out a half-hour arthroscopic operation on Thursday morning.
"He needs around four months to come back to play," Martens told Reuters Television. "But I am optimistic, normally he should play a hundred percent.
"He was pretty nervous because for him it was a difficult moment in his career to decide to go for surgery or not.
"Finally he came to realise himself that it was the only way to help him... there was no alternative ... (In) the last months he felt that the pain was increasing and he felt that finally he couldn't perform anymore on the field."
Brazilian Kaka, who has been plagued by injuries over the past year but recovered to play in the World Cup in South Africa, had left Real's pre-season training camp in California to fly to Belgium.
"He's a very popular player among his team mates and also a very good player but we want him at 100 percent so that he is happy," coach Jose Mourinho told a news conference in San Francisco after Real beat Club America 3-2 in a friendly.
"If we have to lose him for a while it won't be a drama," the Portuguese added. "We have other players and that's that."
Kaka, 28, joined Real from AC Milan in 2009 for a fee of around 65 million euros. He made 25 league appearances last season, scoring eight goals.
Real play a friendly against Major League Soccer (MLS) club LA Galaxy on Saturday in Los Angeles.