Constitution holds up the Union of the United States to be "indestructible", and some legal scholars even claim the Confederacy was in fact, illegal. In other words, there is no way for a state to "legally" unilaterally secede. The constitution simply does not allow it, nor would it have imagined it.
That doesn't mean it can't happen (ex. Texas, the civil war, 1970 libertarians), but it is astronomically unlikely. The legal route Cali would have to take is long before it could peaceably secede from the US. Let's say that the state's populous overwhelmingly votes for secession, it then would have to be ratified by Congress to implement a law allow for Calexit. Then that law would have to be agreed upon by both the president and the Supreme Court, and historically, the Supreme Court views sessesion as unconstitutional. Even in the inexplicable event you could convince President Trump, and the republican controlled house and senate to pass a law allowing Cali to leave the Union, even then the Supreme Court is likely to scrap it on grounds of being unconstitutional.
The only other avenue California could take is armed rebellion, which let's be honest, would end very badly for the state.