The 28-year-old has been struggling with the injury for the past six weeks, seeing him limited to just one training session a week with the Hammers.
Reid took the decision to go under the knife in an attempt to rectify the problem, which relates to a bone growth in his left knee.
With an expected layoff of eight to 12 weeks, skipper Reid will play no part for his national side in Russia but will likely be back in time for the start of next season.
"Obviously I'm really disappointed to be missing the Confederations Cup, but if I had gone there and played, it would not have got better," Reid is quoted as saying by the Daily Mail.
"If the Confederations Cup was nine or 10 days away, I'd probably have given it a go, but the fact it is another month away and it's not getting any better made my decision.
"It's a really weird thing, a bit of extra bone that needed removing and it had been causing a lot of pain in that area every time I was running or kicking the ball. It's been a bit of a struggle for the last six weeks or so, so it's something that I had to get sorted."
Reid has featured 21 times for New Zealand since making his debut in 2010.