Most glucosamine sold as dietary supplements is derived from shellfish. So far, there have been a few small scale studies, like this one, showing that people who are allergic to shellfish can safely take glucosamine supplements derived from shellfish. Most allergic reactions are against proteins in the shellfish, and glucosamine supplements should not contain any shellfish proteins.
However, since there haven't been any very large studies and since dietary supplements are not regulated by the FDA, most doctors recommend that people with shellfish allergies stay away from shellfish-derived glucosamine.
Fortunately, synthetic and plant-based versions of glucosamine (such as this one) are available.