Yes, the setup is compatible but not for all the categories of biking, there are two most famous categories of biking which are mountain and road biking, this setup is compatible with mountain bike hubs, but if you are a road biker then you need to buy small 1.85 sized spacers to make the 8-speed cassette compatible with the 11-speed hubs. spacers are installed before insertion of the 8-speed cassettes to cover the internal splines and internal hollow place of the cassettes with these spacers for road biking. After installing the cassette lock the cassette with the lock nut ring with the help of a compatible-sized wrench tool.
7-speed cassettes are not compatible with 8,9 and 10-speed cassettes, but these three cassettes are interchangeable and easily replaceable with each other. you can also use all of these cassettes on the same 11-sped hubs without any issue. 4.5m spacers are needed to make 7-speed cassettes compatible with the 8,9 and 10-speed freehubs. and 1.85m spacers are used for 8,9 and 10-speed cassettes to make all of these cassettes compatible with the 11-speed freehubs. and if you want to make 7-speed cassettes compatible with the 11-speed hubs then you need to buy new 6.3mm spacers to make both of them compatible with each other.
After installing 1.85mm spacers under the 8-speed cassette and above the 11-speed freehub, check the gear shifting by pedaling your bike, when the rear wheel is rolling shift the gears from lower to high and high to lower cogs to check the gaping of the sprocket and the shifting of the chain. you also have to check the chain compatibility because 8-speed and 11-speed chains are not compatible with each other, the width of the 8-speed chains is7.1mm whereas the width of the 11-speed chains is 5.6mm, so when we compare the width difference between these speeds, then the average difference of width is of 1.5mm, it means it is not a smaller difference between chains, so you have to buy also new bike chain of 8-speed cassettes to make the chain compatible with the cassette.
It means 11-speed cassettes have their own specific chains and 8-speed cassettes have also their own specific chains. 11-speed hubs also depend on the shape and structure of the wheels, there are a few brands that are non-compatible with the splines of the 8-speed cassettes and 11-speed freehub body. check and adjust the B screw and limit screw of the rear derailleur, cable pull rato f gear shifting is much more important because it describes the lateral and longitudinal movement of the derailleur, which will help in shifting gears from higher o lower cogs of the cassette.
Shimano And SRAM Compatibility:
You can easily install Shimano and SRAM brands of 8-speed cassettes with the freehubs by inserting 1.8mm spacers but it is not possible to do the exact setup for the Campagnolo brand, because this brand of cassettes and freehub bodies are not compatible with each other.
Check The Chain Lining:
Always check the lining of the chain and if the chain is not rolling on an accurate lining, then you will get poor shifting of the gears when shifting of gears, to solve this issue you need to inset small wavy washers on the drive and non-drive side of the bottom brackets of your bike.
Derailleur:
You also have to face the problem and issue when the chain will pass through the derailleur cage and small jockey wheels and pulleys of the derailleur because the narrower or wider chain of the 8-speed and 11-speed cassettes have different widths and you need to install new and compatible derailleur.
Gear Shifters:
You also need 8-speed compatible gear shifters for an 8-speed cassette, so if your gear shifters are 11-speed compatible then you have to replace and change these shifters with the 8-speed compatible shifters.
Crankset And Chainring:
Chain rings of cranksets are also specific for specific types of chains and cassettes, you also have to check the dimensions and size of the cogs and teeth of bike chain rigs, if the cogs are compatible with the chain then the chainrings are compatible, if not, then you have to replace these chain rings and buy new compatible chain rings or cranksets.