Most tarantulas cling to surfaces with dry adhesion of thousands of hairs on its feet. The surface to surface attraction holds the tarantula in place. Additionally, tarantulas have claws on the end of the legs that can hook into rough surfaces and provide additional traction.
The Costa Rican zebra tarantula, Aphonopelma seemanni has an additional mechanism. It has hairs that can secrete silk from their tips. If the spider is allowed to walk on a glass surface that is then tilted to a steep incline, the spider at first slips of the glass. It then starts emitting silk from its hairs which halt the slide and keeps the spider hanging on.
Stanislav N Gorb, Senta Niederegger, Cheryl Y Hayashi, Adam P Summers, Walter Vötsch and Paul Walther. Biomaterials: Silk-like secretion from tarantula feet. Nature 443, 407.