JFK was at war with his own military and the CIA. They hated him. Six different times the Joint Chiefs requested JFK send 250,000 troops combat troops into Vietnam. Six times Kennedy refused. His entire administration thought we should get involved in a big war with Vietnam. Kennedy was the only one in his government who balked at that plan. In the end he made an official NSAM ordering a full US withdrawal from Vietnam by 1966.
The CIA, goaded Kennedy into ordering the Bay of Pigs operation Then as soon as it began, they lied and tried to manipulate him into turning it into a a full-blown invasion of Cuba by escalating it by proving air cover. But Kennedy would not allow a precedent where another organization (the CIA) had more power and sway than the entire Executive Branch, besides which, by then JFK and the military realized the Bay of Pigs operation was wholly inadequate from the start and could not have succeeded no matter what.
Not only was he the instigator of the blockade as opposed to nuclear war on Cuba which most his council was for, but privately he said to one trusted confidante, “I’d rather my children be red than dead. If we do what the Chiefs tell us to, none of us would be around afterwards to tell them that they were wrong.”
Before Vietnam the CIA tried to pressure him into a war in Laos, but Kennedy sought and secured a negotiated settlement instead which no one else in his administration was for. He paid lip service to the domino theory, but privately he knew Asia going communist was inevitable anyway.