A flexible tube for an endoscope, the flexible tube having a flexible tube base made of metal, a resin cover layer that covers an outer periphery of the flexible tube base, and a primer layer that includes a compound represented by formula (1) and that is disposed between the flexible tube base and the resin cover layer, in which the resin cover layer includes a polyurethane elastomer on a side in contact with the primer layer.X1 and X2 each represent a hydrogen atom, an alkyl group, a cycloalkyl group, an alkenyl group, an aryl group, an acyl group, an alkoxycarbonyl group, or a carbamoyl group, Y1 represents a hydroxy group or an alkoxy group, and Y2 and Y3 each represent a hydroxy group, an alkoxy group, or an alkyl group.L represents a single bond or a specific divalent group.