Rudy and Liesel from The Book Thief sort-of become friends after Rudy is forced to walk Liesel to school as an apology for hitting her in the face with a snowball, and their interactions always involve lots of cursing and insults.
Jo and Laurie in Little Women. This is exactly why she turns him down when he proposes to her.
Polgara and Beldin in David Eddings' The Belgariad 'verse. They basically greet each other with inventive insults (which are left to the reader's imagination). They both, however, admit to being close friends - Polgara typically calls him "Uncle Beldin", as he was one of the people who raised her. It's just their way, and apparently comes from the fact that Beldin is, unquestionably, hideous - so complimenting him would be a blatant lie.
Polgara picked up the practice from her father, Belgarath, who did much of the insulting before she was born and still slings the occasional friendly barb. Beldin would eventually encourage the Nadrak Vella to try her hand at it. It's the first sign of him realizing that his true love may have come at last, as she was the first ordinary woman to look past his ugliness.
In Hilary McKay's Casson Family Series, one character asks her brother why best friends argue with each other so much more than other friends. His response is because best friends listen to each other so much more than other friends do.
Shakespeare: for one excellent scene in Much Ado About Nothing, Benedick has been tricked into thinking that Beatrice (with whom he has a Slap-Slap-Kiss relationship) is secretly pining away for him... she shows up and insults him as she always does, but as soon as she leaves he begins analyzing their conversation, interpreting every line as a secret declaration of love. Notable for the line, "There's a double meaning in that!"
Subverted, after a fashion, in that Beatrice really is pining away for Benedick but won't admit it to herself. The first question she asks of Don Pedro's messenger is whether he has had any news of "Signior Mountanto," whom she proceeds to mock, telegraphing her real feelings to the audience.
A fairly common trope in the pulps as a form of comic relief. For example Monk and Ham of Doc Savage fame.
Marco and Rachel of Animorphs, with Rachel always jabbing at Marco and his jokes but still having his back when things got serious on them. Likewise, Marco constantly mocks Rachel (like he does for everyone else) as well as occasionally, half-jokingly trying to woo her, but Marco will always have Rachel's back when things get rough.
Really, this applies to the whole group to one degree or another. Marco and Jake were true companions when they were toddlers, Cassie and Rachel have their Odd Friendship, etc. The only real exceptions to this are Ax/everyone else, as Ax is usually polite and respectful.
And Grag (robot) and Otho (android), faithful but bickering allies of Captain Future.
The Ogg extended family in Discworld is full of a dozen long-running petty feuds and twice as many short-term fights at any given point. However, if any outsider dares to openly agree with any one side, the family, as one, will close ranks, and the interloper might not be long for this world.
Similarly, Nanny Ogg's relationship with Granny Weatherwax:
... [Granny Weatherwax] really couldn't be having at all with Nanny Ogg, who was her best friend. (Witches Abroad)
Rincewind and Twoflower — Rincewind does technically like Twoflower, but he is frequently exasperated and snarky with him. Twoflower never picks up on it. This is especially apparent in their reunion in Interesting Times.
Gaspode is like this with Angua in Men at Arms. Despite having nothing in common, Angua tolerates Gaspode because he is the only being she can be honest about regarding her werewolf nature, and he follows her around because as a werewolf she's one of the few humans who don't ignore him because Dogs Can't Talk. In The Fifth Elephant, Gaspode instead becomes this to Carrot.
Also in Men At Arms, Cuddy and Detritus start out hating each other (Dwarfs and Trolls traditionally do), but soon become this.
Harry and Murphy in The Dresden Files are a relatively dark version (neither particularly trusts the other) for the first three books in particular. Then there is Character Development, and the two are a lighter version thereafter.
Both are also very interested in each other.
Harry and Carlos also tend to fire friendly insults back and forth, though without the undertones Harry and Murphy have. Their jabs tend to revolve around Harry being significantly older and Carlos being a virgin.
In the Sword of Truth series, Rachel's adopted father Chase frequently tells her (most affectionately) what an ugly little girl she is, to which her typical response is to burst out into giggles.
Mundo Cani Dog and Chauntecleer of The Book of the Dun Cow are faithful allies when push comes to shove. However, the arrogant Chauntecleer constantly belittles the self-hating Mundo Cani, who is all too happy to accept and even agree with the verbal abuse.
Songs and Swords books by Elaine Cunningham has Danilo Thann and Elaith "The Serpent" Craulnober passing through Worthy Opponent phase to the mix of mutual admiration and annoyance. This strange friendship is interspersed and supplemented with Elaith's acidic sarcasm and Danilo's "innocent" clownade.
Dragaera: Vlad Taltos's friends Morrolan e'Drien and Aliera e'Kieron are cousins but act more like siblings - they usually can't be in the same room for more than ten minutes without bickering furiously, but they also often risk their lives for one another.
In one story, the two get in an insult-war with one another so that they can provoke a fight, and kill the other one in an effort to subvert some local hospitality rules and kill someone else.
Played with in Issola, when, after they start in on one of their fights while Vlad is bedridden and can't get away, he gets exasperated and neatly summarizes the real reason they're always at each other's throats. Notable because a) he hadn't even realized he knew until he said it and b) he made Morrolan look sheepish and Aliera blush. He made Aliera blush.
Kal Skirata and Walon Vau also from the Star Wars Expanded Universe (in the Republic Commando Series). They've banded insults, fought each other multiple times, and have actually tried to kill each other at one point - but in the last book, Skirata admits that Vau's like family to him. It's reciprocal.
Trurl and Klapaucius in The Cyberiad, up to and including physical beatings.
Manny Rubin and Mario Gonzalo in Isaac Asimov's Black Widowers series. In "The Wrong House," the guest of the month points it out:
Levan: Whenever I hear two people spar like that, I am certain that there is actually a profound affection between them. Rubin:(revolted) Oh, God. Gonzalo: You've hit it, Mr. Levan. Manny would give me the shirt off his back if no-one were looking. The only thing he wouldn't give me is a kind word.
The Bastard Operator from Hell series has the Bastard and the PFY. Sure they'll zap each other with the over-voltage cattle-prod, but there's no doubt that they're the best of friends.
Doctor Watson and Sherlock Holmes. Holmes pokes fun at Watson's writing, Watson complains about things like the use of a gun indoors, the constant chemical odor, and the fact that his roommate won't clean up after himself, but when Holmes is in Europe and sick it's Watson who comes for him and when Watson's been shot it's Holmes giving the assailant death threats, which proves the guy who shot him was an idiot.
Pavel and Will from The Year Of Rogue Dragons. Will calls Pavel a charlatan, Pavel tells him "Silence, insect", and both of them constantly insult the other's intelligence. Yet they can always count on each other for anything serious.
Renton and Sick Boy in Trainspotting. In the book, Renton notes that he and Sick Boy started insulting each other in a joking way, but that over time they are starting to really mean it.
Historically, the Seven Kingdoms of A Song of Ice and Fire were this writ large. Every megalomaniac who laid eyes upon the bickering people of Westeros and determined that he would bring them to heel with his sword would find aforementioned "bickering" unexpectedly absent. (The only guy who succeeded had three huge dragons to help him out.)
Cousins and business partners Menedemos and Sostratos in H. N. Turteltaub's Hellenic Traders series.
Hector and Garovel are perhaps a more mild example. While they don't generally try to conceal their true feelings behind, they do end up throwing friendly insults around quite often.
The title character of the Fred the Mermaid trilogy by MaryJanice Davidson has this relationship with all her friends but with her best friend Jonah it gets Turned Up to Eleven. It's a rare day when at least one of them doesn't threaten to kill the other.
Cinder and Thorne of Lunar Chronicles - after breaking out of prison together and bickering nonstop for several days, they have this relationship to a T.
Elsabeth Soesten and Brother Hieronymus are constantly sniping at and insulting each other. The very first scene of No Good Deed... has Elsabeth and Hieronymus yelling at each other over the predicament they're currently in, which is only mostly to get the outlaws surrounding them to let down their guard enough so the pair can take them unawares.
The Malazan Book of the Fallen series has Quick Ben and Kalam. Kalam goes so far as to threaten (and they try) to throttle Quick Ben, calling him all sorts of names, while Quick Ben just cannot pass up an opportunity to be a Smug Snake and provoke Kalam. They're each other's oldest and closest friend, though, so beware anyone who even looks at one of them funny.