It's supposedly meant to "just work" but out of the box it did not. Which is a very common story with ubuntu sadly.
Ubuntu ships ZFS module in kernel package and it works without having to be compiled nor it needs header package.
Ubuntu ships ZFS module in kernel package and it works without having to be compiled nor it needs header package.