Cross-country skier Ingvild Flugstad Østberg announced her retirement after winning 27 World Cup victories and 10 championship medals.