If the electrical is in good condition do I have to replace the knob and tubing or is that optional? And if I do have to replace it is that a deduction?
You do not HAVE to update knob and tube if everything is working fine (according to an electrician.. not just making sure all the lights turn on and off).
As far as a 'deduction'... I am not sure what you mean by that. You may want to talk to your tax accountant and find out if it would be best for you to take it as a single expense hit for the year or add it as a capital investment to the property and depreciate it.
Replacing knob and tube wiring would not be a tax deduction. It's a capital expense. You most likely have to deduct that amount over 27.5 years which is the number of years the IRS prescribed as the useful life for residential property.