Darren Russell, 52, lunged at Christopher Williams, 43, and his ex-partner Debbie Cook after cornering them in a telephone kiosk on the junction of Monks Road and Lindum Hill in Lincoln.
Both men are originally from Boston.
Lincoln Crown Court heard the attack took place in broad daylight shortly before 5pm on 8 April this year after Miss Cook and Mr Williams tried to hide from Russell in the telephone kiosk.
Phil Howes, prosecuting, said "This was a day time stabbing in Lincoln in front of members of the public, including children.
"The injury could have been much worse."
CCTV showed Russell walking away with something in his hand.
Witnesses described the weapon as an eight inch meat cutting knife being held upwards, the court was told.
Mr Howes said the whole incident lasted around 60 seconds, with Russell lunging at Mr Williams three times after he left the phone kiosk and asked him to put the knife down.
Mr Williams flagged down a passing police car and bravely tried to reassure Miss Cook after an ambulance was called.
The single wound was bleeding when the ambulance arrived but stopped a short time later.
Mr Williams was treated at Queens Medical Centre in Nottingham for a 2cms cut which fortunately missed his major arteries and voice box.
Police arrested Russell at the YMCA where both men were staying and were known to each other, as they originally came from Boston.
The court heard Russell offered up his hands to be arrested after telling the officers "I've stabbed Chris Williams in the neck, there was blood all over."
Russell said Miss Cook and Mr Williams "had been going at him all day."
However during interview Russell made no comment.
Neither Miss Cook or Mr Williams made a victim impact statement.
Neil Sands, mitigating, told the court Russell had been out of trouble for 15 years.
"That is a significant period of time," Mr Sands explained. "For the last nine years he has been living at the YMCA.
"The last ten months prior to April he had been in a relationship with Miss Cook.
"That was a significant personal development for him. Then Mr Williams comes into the mix."
Mr Sands said Russell was "taken a
back" when Miss Cook rang him and said their relationship was over.
Russell admitted taking the knife with him, but insisted he did not intend to stab anyone.
"He is at a loss why he did it," Mr Sands added.
Russell, of St Rumbolds Street, Lincoln, pleaded guilty to wounding with intent to cause grievous bodily harm and a second charge of threatening behaviour with an offensive weapon on 8 April, 2022.
Passing sentence Judge John Pini QC told Russell it was only luck that the inury to Mr Williams wasn't much more serious.
"To stab someone in the neck is very serious," Judge Pini explained.
"It's pure luck you are not facing a murder charge."