You only need to install tensorflow-io pip package and do the import tensorflow_io as tfio. There’s no need for any other code change as the filesystem plugin would be loaded behind the scenes.
Alternatively, export TF_USE_MODULAR_FILESYSTEM=1 in all hosts/envs that need to access hdfs should work. If it doesn’t, can you provide a minimal example and the error logs?