There have been projects for connecting an inverter to the 12v battery in a Tesla. 2kw isn't going to power a house, but it would definitely help keep your refrigerator and internet equipment powered through an extended mains outage.
It's best to attach straight to the battery rather than using one of the 12v outlets, as those outlets are fused to 15A I believe. Which isn't much power.
You'll want to verify the maximum output of the battery and the DC-DC inverter of the particular Tesla you're working with, as I believe they may vary.
Also, newer Teslas are no longer using 12v batteries, and not all inverters are compatible with higher voltage input.
I had wanted to do this in my 2020 Model Y a couple years ago and never got around to it. I wish I had - we had a few power outages here that lasted upwards of 7 hours. Being without internet and trying to make polite conversation with the wife for that long is tedious!