There are not many soliloquies in King Lear. The best example of a soliloquy in this play is the opening speech by the villainous Edmund in Act II, scene 2, beginning with the words "Thou, nature, art my goddess; to thy law / My services are bound." Edmund is all alone and is expressing his thoughts aloud.
In the opening lines of Act IV, scene 1, Edgar is alone and speaking his thoughts aloud in a soliloquy of nine lines, beginning with "Yet better thus, and known to be contemn'd, / Than still contemn'd and flatter'd."
Lear's famous tirade in the opening of scene 2 of Act III may be considered a soliloquy even though he is accompanied by the Fool. He is not speaking to the Fool and is entirely unaware of his presence.