In various openings it's fine, at least temporarily, and usually to get out of the way of other pieces.
Maybe the most well known would be the chigorin defense to the ruy lopez (Nc6-a5 gets out of the way of the c pawn), or in the KID when you play Nf6-h5 (to get out of the way of the f pawn).
Other times e.g. on c3 all the knight's advanced squares are covered, so you might go Na3 intending Nc2-e3 (for example).
The rim is rarely a good final destination though.
Can anyone show games where a knight on the rim was good?