Urgent dog lovers

Pls help me understand

My puppy is 8 months

And he is going to crazy in the house

He refuses to pee/ kaka outside

But all he does is doing it at home

All over our carpets

Now he started lifting his leg and pee on the couch

No matter what I do

He won’t listen , doesn’t go to the pads

Today

He went to my husband

Laying down on the couch

And he pee on his head

This is just crazy

What is it