This happens in England fairly often, actually. The basic cops don’t have guns, they have specifics fire arms units. Sometimes detectives can carry, but they have to have a written justification for it, and it is very closely monitored. Even tasers are considered firearms for these purposed. They use a combination of PAVA and CS spray, speed cuffs, and, if the person isn’t deterred with the spray, batons. The batons are not allowed to be used on the head, and each use is investigated to a degree that would make american police quit.
So how it normally goes, police arrive to man weilding knife, give warning, spray, tackle, cuff. If the spray doesn’t seem put them in a state in which they clearly are struggling to function, they may attempt to hit them, almost always on the legs, with their batons. If this seems dangerous, they will surround the person with the knife, and call in a firearms unit. This unit will, with very, very, very, few exceptions, will use their taser to incapacitate the person. Is this systems perfect? No. However it is incredibly rare that police shoot people with guns. Police killing people, in the UK, for any reason, is far more rare.