In California, K is not compulsory - BUT - enrollment in school during the year containing the sixth birthday is, and children must turn 5 before a cutoff that is moving to the first day of school to attend K. There's an equivalent cutoff of turning six for first grade. So realistically speaking, K during the year they are 5 is only optional for kids with summer birthdays, and those kids are not usually considered for placement in first grade afterward unless they have completed K already.

There is always the option of homeschooling for K and 1, I suppose. There is no age cutoff for second grade.