In Season 2, when Jackson became a kanima, his first Master came to be Matt Daehler. Matt was an unhinged teenage boy who held a vendetta against a group of people involved in his near-drowning years earlier when he was a little boy, including Mr. Lahey.
Matt, at one point, unintentionally took a photo of Lahey. He looked down the lense of his camera, feeling an unbelievable rage, wishing Lahey was dead. Jackson, who was newly transformed and thus seeking a Master, reacted to this vengeful feeling elsewhere and carried out Matt's vengence. When Matt first saw Jackson in his kanima shape, the shapeshifter was instinctively attracted to him, and vice versa. Once bonded to Jackson, Matt saw that the Kanima had killed Lahey for him.
Matt figured out that Jackson would kill again for him. He visited Tucker Cornish, another individual involved in the incident and took another photo. Matt realized the bond between him and his servant had bestowed these new traits power upon him. He just had to take a photo of his victim, or think about it, then Jackson would take their life. Matt used his servant to kill all the people involved in the incident.
In Fury, Matt Daeher is killed by Gerard Argent. Gerard then becomes Jackson's new master by greeting the Kanima afterward. This is most likely due to Gerard being a psychopath and his deceptive character, qualities the Kanima presumably searches for in its Master. This could explain why Jackson didn't attack Gerard in Frenemy, because the shapeshifter saw Gerard as a noteworthy Master.