The analysis of experimental data obtained in heavy ion collisions at RHIC and LHC showed that the evolution of the quark-gluon plasma (QGP) is well described by nearly ideal hydrodynamics. However, even small dissipative processes which appear in QGP should be taken into account. Then QGP is described by relativistic viscous hydrodynamics, characterized by the transport coefficients, for example, the shear η and the bulk ζ viscosities. The values and properties of these parameters not only carry the information on how far the system appears from an ideal hydrodynamics but also provide a relevant insight into the hydrodynamic evolution of a fluid. During the talk, I will show how to obtain viscosity coefficients of the QGP using the relaxation time approximation to Boltzmann equation.