The Streamlight TLR-8 Sub is not compatible with the Glock 21. You would need to use the Streamlight TLR-8A Weapon Light and Laser, which includes rail keys that are compatible with the Glock accessory rail, and can be found by using the link below:
https://www.opticsplanet.com/streamlight-tlr-8-a.html