I need to change the type of EC2 instances for my worker nodes. Here are what I did.
- tutor k8s stop.
- terminate current worker nodes.
- launch new worker nodes.
- tutor k8s start
All pods were running fine excepted for Caddy.
I described the caddy pod and got this message.
x node(s) didn't match pod affinity rules
After researching for awhile I found this PR.
There is a line in the PR description stated that
we need to ensure that its replacement Pod is scheduled on the same node as the original Pod.
In my case, I think I lost the original node that Caddy was init on.
I eventually removed affinity rules in the Caddy deployment script to start Caddy. But I’m afraid that this will lead to the problem stated in the PR I mentioned earlier.
What should I do in this case?
@regis what do you think?