How to fix clipping knee joint with ik bones?
I've tried the following things and it seems to work:

Enable the Armature modifier's Preserve Volume option

I've added an edge loop above the joint:




I've segmented the small bone:



I've extended a bit its influence upwards in Weight Paint mode, use Mix, Substract, use also the Blur brush:



And I've extended a bit the influence of the top leg downwards:


A try with 2.79, I 've added a Pole Target to make it bend correctly: