Based on the framework of our previous work [H.L. Lai et al., Phys. Rev. E, 94, 023106 (2016)], we continue to study the effects of Knudsen number on two-dimensional Rayleigh–Taylor (RT) instability in compressible fluid via the discrete Boltzmann method. It is found that the Knudsen number effects strongly inhibit the RT instability but always enormously strengthen both the global hydrodynamic non-equilibrium (HNE) and thermodynamic non-equilibrium (TNE) effects. Moreover, when Knudsen number increases, the Kelvin–Helmholtz instability induced by the development of the RT instability is difficult to sufficiently develop in the later stage. Different from the traditional computational fluid dynamics, the discrete Boltzmann method further presents a wealth of non-equilibrium information. Specifically, the two-dimensional TNE quantities demonstrate that, far from the disturbance interface, the value of TNE strength is basically zero; the TNE effects are mainly concentrated on both sides of the interface, which is closely related to the gradient of macroscopic quantities. The global TNE first decreases then increases with evolution. The relevant physical mechanisms are analyzed and discussed.