The current invention relates to a method for making a camera housing of an endoscope having a camera housing arranged at the distal end of the insertion portion, said camera housing being a molded component comprising an outer surface, a camera device embedded in the material of the camera housing, a light source embedded in the material of the camera housing, an opening at the distal end of the camera housing, and a channel in fluid communication with said opening. The endoscope further comprises a tube which provides fluid communication between the channel in the camera housing to the proximal end of the endoscope. The endoscope further comprises a bending portion arranged at the distal end of the insertion portion and at the proximal end of the camera housing and where the most distal portion of the bending portion is embedded in the material of the camera housing.