According to the Los Angeles County Sheriff's Department, the deputy responded shortly before 7:30 p.m. to a 911 call of an intoxicated person waving a knife in the 1000 block of Leonard Avenue.
When the deputy arrived at the scene, he was flagged down by the caller. The suspect allegedly approached the deputy as he was getting out of his patrol car.
Witnesses said the armed man was told to put down the knife. The deputy then opened fire, striking the suspect at least once in the upper torso, a sheriff's spokesperson said.
The suspect was transported to a hospital in unknown condition. The deputy was uninjured.
A 12-inch kitchen knife was recovered at the scene, investigators said.