A cannula unit (1) comprises a housing (2) and a flexible cannula (3). The flexible cannula is provided with an end area (32) that deviates from the shape of the rest of the flexible cannula. Said end area of the flexible cannula has e.g. a funnel-like shape (32) or the shape of a flange. The end area of the flexible cannula is positively locked to the housing by clamping (211, 221).