Did the USSR know of the US's containment policy? Did it try to counteract it?
This is a difficult question to answer since there were very few Soviet analogues to Kennan's overarching Containment Doctrine. One could argue that Marxist-Leninism, which argued that a revolution could be achieved under the leadership of an organized communist party, was the cornerstone of the Soviet's understanding of foreign affairs, but the importance of a Marxist-Leninist Weltanschauung generates more questions than answers. Although Moscow's foreign policy establishment produced reams of pronouncements on world affairs, these were often couched in such sweeping ideological rhetoric that made it difficult to parse out what was actual Soviet policy. One of the important subfields of the West's Cold War-era Kremlinologists was engaged in actively trying to parse out the kernels of wheat from its Marxist-Leninist chaff.
In general, the Soviet's foreign policy in the Cold War had a degree of continuity from its foreign policy in the 1930s. The position of the USSR was that it was the leader of a large global movement of both anti-fascist and anti-imperialist organizations. Within this umbrella organization of the global left, Moscow reserved pride of place for local communist parties who were tasked with being the ideological leaders in local political movements. The Soviets encouraged party discipline and demanded a degree of loyalty from the leadership of various communist parties. Andrei Zhdanov's 1947 pronouncement of the creation of the Cominform, a successor to the disbanded Comintern, outlines this Soviet-centric umbrella approach:
In the pursuit of these ends the imperialist camp is prepared to rely on reactionary and anti-democratic forces in all countries, and to support its former adversaries in the war against its wartime allies.
The anti-fascist forces comprise the second camp. This camp is based on the U.S.S.R. and the new democracies. It also includes countries that have broken with imperialism and have firmly set foot on the path of democratic development, such as Rumania, Hungary and Finland. Indonesia and Vietnam are associated with it; it has the sympathy of India, Egypt and Syria. The anti-imperialist camp is backed by the labor and democratic movement and by the fraternal Communist parties in all countries, by the fighters for national liberation in the colonies and dependencies, by all progressive and democratic forces in every country. The purpose of this camp is to resist the threat of new wars and imperialist expansion, to strengthen democracy and to extirpate the vestiges of fascism.
Even though Zhdanov's declaration was one of the first major foreign policy pronouncements by a Soviet leader in the postwar era, the Cominform fizzled out despite the fears it engendered in the West's anticommunists. In practice, the Soviets sought to use the structure of the Cominform to break any sign of independence from its constituent members. Although initially headquartered in Belgrade, Yugoslavia would actually be expelled from the Cominform less than a year later on account of Tito's independent approach to Yugoslavia's relations to its Balkan neighbors. The Cominform's coordination with Western communist parties fared little better. Instead of resurrecting a Popular Front strategy, Western communist parties increasingly adapted a strategy of being political outliers critiquing the postwar political establishment. Although this meant communism was able to make some ideological inroads in the West, especially in the late 1940s, Western communist parties became marginal political actors. The case of the KPD was an extreme example in which its kneejerk political activism (abetted by forged documents provided by the CIA) led the FRG courts to ban it as an antidemocratic party in 1956.
Underlying the general failure of the Cominform is a thread that remained one of the few consistencies of Soviet foreign policy: whatever the situation, Moscow's interpretation and interests were paramount. This fusion of realpolitik and Marxist-Leninism created a highly mercurial foreign policy that was highly reactive in nature. In his memoirs, Molotov outlined thegeneral thrust of the Soviet postwar view of its interests:
They hardened their line against us, and we had to consolidate what we had conquered. We created our socialist Germany in part of Germany, and in Czechoslovakia, Poland, Hungary and Yugoslavia, where the situation was fluid, we needed to restore order. Suppress capitalist order. This was the Cold War. Of course, you had to know the right measure. I believe that in this sense Stalin kept himself well within the limits.
Italy in the late 1940s was a case in point of how Stalin tried to temper the situation in favor of order. The attempted assassination of the PCI leader Palmiro Togliatti in July 1948, coupled with widespread allegations of electoral fraud the previous April, generated widespread strikes and demonstrations among the Italian left. Togliatti would sometimes employ the rhetoric of civil war in public pronouncements, indicated the PCI was going to lead a wider struggle. Stalin reigned in this rhetoric, underscoring to Togliatti that the PCI had not exhausted all legal measures to power and that a civil war was not in the larger interests of the Soviet Union. So despite fulfilling much of the criterion of Zhdanov's proclamation, Soviet geostrategic interests trumped that of the need for a global struggle.
Moscow's insistence that it was the elder brother of the global communist movement did not sit well abroad, especially in areas outside of direct Soviet military power. Stalin's somewhat patronizing attempts to control Mao and the CCP poisoned Sino-Soviet relations well after Stalin's death. With the conclusions of hostilities in 1945, Stalin desired for Mao to continue his wartime collaboration with the KMT and Chiang Kai-Shek. Stalin believed not only would the KMT prevail in a civil war, but that civil war would destroy China. Stalin gave Mao a diktat in August 1945 that he should travel to Chungking and negotiate with Chiang or "his stand would be repudiated in China and abroad." The Chungking meeting had the opposite effect than Stalin intended. Mao's meetings with Chiang reinforced within him the idea that he could win a civil war; Mao would later claim that Chiang was "a corpse and no one believes him anymore." The communist victory thus came as much a shock to Moscow as to Washington. Although the Red Army turned over some Japanese war material to the CCP, they largely kept the best equipment and destroyed the remainder. Mao's victory emerged as a fait accompli for the newly-formed PRC as the USSR could not repudiate a successful communist revolution. But this did not stop Stalin from insisting that the PRC make economic and political concessions to the USSR and refused to aid Mao in efforts to invade Taiwan.
The emergence of Mao and the PRC as an ideological rival deeply unnerved the Kremlin and colored the perceptions of its foreign policy. With an alternative and seemingly more vibrant Marxist rival, Soviet actions seemed to be much more the actions of an old-school great power than a force trying to lead the world's downtrodden masses. The need for the Soviets to maintain security over Eastern Europe led to a series of crackdowns in East Germany, Poland, and Hungary. In light of these actions, Khrushchev's attempt to craft a peaceful coexistence with the West became the source of much criticism in the PRC and other left radical groups. The dissolving of the Cominform in 1956 and the Soviet destalinization drive gave further fodder for these anti-Soviet critiques. This denuding of its ideological purity meant that as the USSR sought to engage with movements in the Third World like Nasser's Egypt, Soviet foreign policy appeared to many as less it leading an umbrella movement and more as sheer opportunism. The fact that many of these nationalist movements in the third world, such as Nasserism or Ba'ath ism repressed or subordinated local communist parties gave cause for further critiques of the USSR for its self-interested foreign policy.
These matters came to a head in the 1968 Prague Spring where a Warsaw Pact invasion crushed a Czechoslovakian reform movement. The resulting outcry both within the Soviet sphere of influence and abroad was quite condemnatory. The result of this outcry was the most clearly articulated Soviet position on foreign policy yet, the Breznev Doctrine. Although the Brezhnev Doctrine fit within the pattern of prior Soviet (or Soviet-enabled) interventions in Hungary, Poland, and East Germany, the Doctrine was only truly formalized in the aftermath of Prague Spring. The rationale behind it was to try and reinvigorate the connectivity of the Warsaw Pact and underscore each member's commitment to the Marxist-Leninist socialism championed by the USSR. The Doctrine not only stated that the USSR had a right to intervene in a Warsaw Pact state if it adapted a political course contrary to socialism, but also other Warsaw Pact states had to intervene as well. The fear of other Warsaw Pact states forming their "own road to socialism," and breaking Moscow's monopoly on what it perceived as the correct political path. This fear was particularly acute for many Soviet leaders and the events in Prague Spring underscored how such a danger was real.