Nuclear powered submarines are designed to be self-contained vessels with self-sufficient systems that can keep their crew alive and capable of fighting major wars with rival superpowers, for months on end. A nuclear reactor on board that requires minimal maintenance, has huge reserves of power to drive a sub for a half-dozen trips around the world, and systems that are engineered to the mostest that multi-billion dollar R&D budgets can get, are probably a whole lot better than what even the most successful survivalists can access.
If a ZA happens, this virus probably mutated in the last couple days/weeks and started a flashpoint that multiplied exponentially. A typical combat patrol on a nuke sub lasts months, and most personnel were probably not exposed to the mutated virus.
Nuke subs have awesome engineering that was designed for a total apocalyptic scenario, against another nuclear-armed power, and the big boomers were designed to have firepower to wipe out entire nations. See the Wikipedia page on Ohio-class subs to learn more about these truly apocalyptic machines:
The Soviet equivalent of the Ohio class (sadly reaching the end of their life now):
The US Navy alone has over 10,000 Navy personnel on board their nuke subs, mostly untouched by the virus, able to destroy the world (or a Giga-Herd-infested city) on demand, with the best comm gear available, and some of the best military guys on the face of the earth. The submariners can stay cut off from civilization for months, and are always hyper-suspicious of signals from land, and are always, always ready. That is their job...if an enemy destroys every aspect of American civilization, they will exact vengeance on a Biblical scale.
Read "Russian", "British", "French", "Chinese", "Indian" instead of "American" depending on your flag...they all have nuke subs, in that order of firepower. Similar highly trained personnel, unlimited electricity, ultra-high level of suspicion, and massive firepower.
OK, now to the ZA. I say that nuke sub crew are the best-positioned to be the survivors of the Apocalypse, and areas that are totally overrun by walkers will be simply nuked out of existence (yeah, survivors have to deal with more radiation in the atmosphere...tough luck).
If a sub crew waits a few months until survivor groups establish a safe port, communicate with the survivors and then dock, can't that be a nucleus for reclaiming civilization? Multiply that by 100 nuke subs, with each captain making his own decision on which port to dock in (and nuking out the known mega-herds).
Maybe an international effort from submariners from all countries, or maybe just isolated fortresses with total military-grade command, control and communications.