I would like to challenge the framing a little - this is a relationship problem.
In your question, you say "and immediately rebelled against the project idea I had assigned him without a good reason"
I don't know if this is different between countries, institutions, etc, but to my knowledge, in Australia, a PhD student is fundamentally in control of their PhD research, with the supervisor tasked with providing advice and guidance, rather than instruction.
Obviously, this is influenced by funding questions, and so the PhD student would naturally be constrained to some degree as to their research.
However, I notice your description of the student as rebelling against the project idea you "had assigned him". This sounds less like a PhD student learning to be an independent researcher and more like a PhD student being used as a cheap form of academic labour.
It may have merely been a choice of words, or this may be more typical in your country or institution.
I note that you said in a comment "But my job is not to rehabilitate people into decency, it is to run a well-oiled lab". No, it isn't. You are the student's supervisor for their PhD. In this role, your job is to mentor the student into an effective researcher. If this isn't the role you have in mind, then you shouldn't be supervising PhD students.
Now, don't get me wrong, this doesn't excuse the student being "rude", but it may explain it. The question to ask yourself is, how much reasoning and guidance did you provide to the student regarding the task you were asking them to undertake? How much control did you provide to the student regarding the task?
Let me use an invented example. Suppose you're running a chemistry lab, and your student's official project is about finding ways to manufacture a particular compound (this may be simpler than a real PhD in chemistry, but as a mathematician, I don't generally work in a lab). Suppose you have an idea for what could be a really efficient way to manufacture the compound.
Version 1: You go to the student and tell them to test this specific method, with a detailed plan - their role in the lab will be to gather the appropriate components, assemble the experimental apparatus, and run the experiment. When they're done, they give the results to another person to analyse to determine whether it was a success.
Version 2: You provide the student with the idea and task them with exploring it. You answer any questions they might ask, and ask them to provide you with a plan of attack before they put anything into motion. They come up with a variation on what you were thinking, and you give them the okay to proceed with the lab work.
In the first version, you aren't mentoring a student, you're instructing a lab tech. The student isn't a lab tech, and thus they are likely to balk at being treated as such.
In the second version, you are mentoring a student. You are providing oversight and guidance, but it's the student's research being done.
This may not be the case, of course - you might be properly trying to supervise the student, and they could be pushing back because they have issues with any kind of influence, or because they've got issues of some sort. That's something for you to figure out, before you make any irreversible decision.
And to answer the explicit question, I would say that, if you were to fire the student without at least making a real effort to guide them to be better (which takes more than a few weeks), then you are likely to gain a reputation for being unreasonable with students - if only because the student is capable of telling their version of the story.
There is no particular length of time you need to wait, but rather an amount of effort you need to put in. If you put in that effort, and the student doesn't respond, then it is likely that the student will come to the same conclusion as you - that it's not working - and you can arrange for either their transfer to a new program with a different supervisor, or for their ending of their candidature.