Provided are: a flexible tube for an endoscope, in which the flexible tube has a metal flexible-tube base material and a resin coating layer that covers the outer periphery of the flexible-tube base material, and has a primer layer containing a compound represented by formula (1) between the flexible-tube base material and the resin coating layer, the resin coating layer containing a polyurethane elastomer on the side adjacent to the primer layer; an endoscope type medical device comprising this flexible tube for an endoscope; and methods for producing the flexible tube for an endoscope and the endoscope type medical equipment. X1 and X2 each denote 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 denotes a hydroxyl group or an alkoxy group. Y2 and Y3 each denote a hydroxyl group, an alkoxy group or an alkyl group. L denotes a single bond or a specific divalent group.