The knee is capable of swelling to an alarming size, and it is only when you understand the anatomy does the reason become clear.
Enclosing the articulating part of the knee joint is a water-tight capsule made of a strong fibrous material lined on the inside with a thin layer of secretory cells. This inner lining is called the synovium, and despite being a thin layer, it is arranged in folds, so that the surface area available for fluid secretion is actually quite large.
Normally the synovial cells secrete just enough fluid to lubricate the cartilage of the bones and the menisci - neither have a proper blood supply. But if anything irritates the inside of the joint, then these cells over-secrete and the capsule can become filled with a straw-coloured fluid, which is called an effusion. The capsule normally has slack folds, but now the folds are taken up and the capsule expands like a little balloon.
The kneecap or patella has its undersurface inside the capsule, but because this bone is unusual and located within the tendon of the quads muscle, the kneecap can be lifted up as the fluid pressure increases. Indeed, one of the tests for fluid in the capsule is to extend the knee and rest it on a firm surface and then to 'bounce' the patella - if there is an effusion then the patella will be able to be bounced.
Another test for fluid in the knee is again to extend the leg in the same way but flick the index finger against the side of the knee, and feel with the flattened hand on the other side of the knee whether it the excess fluid transmits a 'thrill'.
A third test - again with the leg extended - is to put the palm of the examiner's hand onto the patella with finder and thumb cupping the area, and then glide the palm upwards, driving the fluid up into the pouch area (suprapatellar pouch) above the patella. Often it will visibly bulge, or the fluid can be revealed by tapping the fingers with a bit of pressure.
Sometimes it it not joint fluid that is filling the capsule - but blood. A collection of blood within the capsule is called haemarthrosis. The difference between the synovial fluid and the blood, is that the latter is much more irritant and can cause the swollen joint to be painful. If the joint is briskly filled with blood because of active bleeding from a blood vessel then it can be very tense and excruciatingly painful, requiring a visit to the emergency depart for the fluid to be syringed out.
The knee can also be swollen from fluid outside of the joint if fluid is leaking out of the capsule and into the soft tissues around it. This might happen if the capsule is torn. In this case the swelling might be boggy, and a finger pushed into the area for a few seconds might leave an impression.
On occasion, raised fluid pressure within the capsule can reveal itself via a Baker's Cyst - a small and painful cystic swelling in the crease at the back of the knee. This is a herniation of the joint capsule through a weak area at the back of the knee, usually attributed to increased joint pressure, such as you might get from knee arthritis.
Illustrations of the knee joint from the side, showing the joint capsule initially empty of fluid, and then in the next illustration it is shown filled with fluid.
This little video is snatched from a course I created some time ago - so it is a bit out of context, but it may just help you to understand the capsule a little bit more...