Cucumbers grow and climb to different heights depending on the species of the cucumber.
Cucumber plants grow and climb between 5 and 6 feet tall and some cucumber plants may even reach 7 feet tall in rare instances.
As long as you provide at least a 6 feet tall trellis for the cucumbers then there should be no problem and that should be an adequate height for the trellis or anything else you set up for the cucumber plants to climb.