A man who killed his dog with a kitchen knife has been jailed for 18 months and banned from keeping animals for life.