Your protection against retaliatory eviction
No. California law prohibits retaliatory eviction, so a landlord generally cannot lawfully evict or punish you just because you reported a cockroach problem or asked for pest control.
Retaliation can look like a sudden eviction notice, a rent increase, or reduced services soon after you complained. The timing often tells the story — action taken shortly after you raised the infestation may be unlawful. A landlord can still end a tenancy for a lawful, unrelated reason, but using an eviction to punish you for asserting your habitability rights is not allowed.
Your best protection is a clear record: keep copies of when you reported the roaches and note anything the landlord did afterward. If you have received an eviction notice or threats after reporting an infestation, these matters are time-sensitive. Talk to an attorney promptly, and a free review can help you understand your options.
This is general information about California tenant rights, not legal advice. Every situation is different.