Yes, penguins have knees. The Two Oceans Aquarium Foundation reports that the joints developed to stay tucked inside the body cavity.
The obvious bend in the middle of the leg is a different joint. According to National Geographic, most viewers mistake that bend for the knee when it works as the ankle.
Why the middle bend counts as an ankle

In Palaeo Electronica, researchers label the ankle the intertarsal joint. Present day penguins walk on their toes, though they use whole feet at rest, a pattern the journal describes as essentially digitigrade and shared with most birds.
What an Eocene leg skeleton preserves
In Palaeo Electronica, an account of an Eocene penguin specimen mentions a partial pelvis and leg skeleton, naming the femur, tibiotarsus, fibula, tarsometatarsus and phalanges.
Shortened penguin tarsometatarsi and waddling gait

In Integrative Zoology, researchers describe penguin tarsometatarsi as shortened and flattened. Palaeo Electronica notes that, for geometrically similar birds, a longer tarsometatarsus compared with the span from flexor attachment to intertarsal joint gives lower force output. The zoology study adds that, for diaphyseal resistance to sideways bending loads, living penguins are explicitly more efficient than Eocene Sphenisciformes, which can be interpreted as suiting the waddling gait of living penguins.
Sources
- National Geographic: Crouching Bird, Hidden Dinosaur
- Two Oceans Aquarium Foundation: Why do penguins waddle?
- Palaeo Electronica: Skeleton of an Eocene penguin
- Integrative Zoology: Fossil and modern penguin tarsometatarsi: cavities, vascularity, and resilience
- Nature: Penguin waddling is not wasteful
- San Diego Zoo Wildlife Alliance: African Penguin