The CSA was founded largely to preserve slavery and white supremacy. Nazi Germany's ideology was similarly rooted in racial hierarchy, particularly antisemitism and Aryan supremacy. Their racial ideologies might have created a sense of shared worldview or at least a mutual understanding.
While the CSA originally had a constitutional government similar to the U.S., in this hypothetical timeline, it could have developed into a more authoritarian or oligarchic regime, especially if militarism and plantation aristocracy dominated. This could have made it more ideologically compatible with fascist regimes.
Both regimes would almost certainly be vehemently anti-communist. This shared opposition to the Soviet Union could have aligned them geopolitically
If the CSA was still a largely agrarian and resource-rich economy (especially cotton), it might have looked to Germany as an industrial trading partner, particularly if relations with the Union (USA) remained hostile or cold.