Liverpool boss Jurgen Klopp will leave the club at the end of the season after nine years at Anfield, it was announced on Friday.