There are number of issues that must be addressed.
If the glucosamin is only manufactured from the inedible shell of the shellfish, as I found mentioned in one source, then the medicine would not be considered treif to begin with, if there are no other problematic ingredients.
If the glucosamin is not kosher; have you been diagnosed with osteoarthritis or other similar condition that would lead you to be classified as a choleh, or did the doctor recommend these pills as a preventative measure?
If you are considered a choleh, it still remains to determine if glucosamine is a halachically reliable method of treating your illness. From the information I found, while numerous studies confirmed the efficacy, they were all sponsored by the manufacturer. Most of the independent studies found no difference in results from a placebo.