Alliances in 19th century
In 1890, Russian Empire proposed that Reinsurance Treaty with Germany be prolonged and Germany agreed to new terms. Seeing a possibility of development of a new military alliance between Germany, Austria-Hungary and Russia, French politicians became increasingly worried as many of them hoped for a war that would allow them to reclaim Elsass-Lothringen (Alsace-Lorraine in French) lost after the war in 1871. As result, in 1891, France and UK signed a defensive pact, much to French disappointment, as the French had hoped for an ally to attack Germany.
Another country, believed to be a natural ally of France was Italy. They, however, refused to ally with France, due to their preoccupation with Ottoman Empire, as Italo-French relations were still sour as result of Italian annexation of Rome and French and British support for Turkey. Italy was also hesitant to aggravate its relation with its neighbour, hoping rather for more opportunistic annexation of Italia Irredenta.
Early 20th century
Russian revolution of 1905 shook the world, forcing the most reactionary monarchy in Europe to implement some reforms. This especially negatively affected German-Russian relations, as Emperor Wilhelm II realised that under the guise of huge size, Russian empire was very unstable due to social pressures from the disenfranchised classes.
1904-1907 saw Herero and Namaqua rebellion against German colonial exploitation. Rogue German general von Trotha crushed the rebellion and with huge brutality re-instituted German power. This incident showed that maintaining colonies in the long run is unprofitable and might be impossible.
1905 union of Norway and Sweden was dissolved, ending all hope for a Pan-Scandinavian Union. In 1908, Bulgaria declared independence as result of Young Turk Revolution, which took over Ottoman Government, marginalising Sultan's power. This significantly severed relations between Turkey and Germany.
In 1912, Balkan League consisting of Greece, Serbia, Bulgaria and Montenegro declared war and soundly defeated Ottoman Empire, ending nearly all their presence in Europe. 1913, unsatisfied about division of Macedonia, Bulgaria attacked Serbia and Greece. Bulgaria was, however, back stabbed by Romania and Ottoman Empire and forced to make even larger concessions to its neighbours. Sudden loss of power of Bulgaria made Germany lose their interests in the region and give up on plans to build Istanbul-Berlin railway.
British Empire was also beginning to show signs of weakness. Irish rebellion, while crushed by the British, forced to give Ireland home rule. In 1912, Qing Empire is overthrown by Sun Yat-sen. Hoping for an ally to counter the threat of Japanese domination of East Asia, Germany recognises and supports this new nation, agreeing to give up its concessions in China, but leasing them for 30 more years. By 1916 however, China loses control of most of its territory that is taken over by local aristocrats and plunges into a civil war.