You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
I have applied the following yaml file. When I added a new rough field, I observed that the Pod did not respond. When I updated other fields again, sts did not respond either. I suspect that the controller was hung by some abnormal state at this time.
I found the following error in the controller log.
StatefulPodControl failed to update Pod error: Pod \"krusie-statefulset-0\"
is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`,
`spec.initContainers[*].image`, `spec.activeDeadlineSeconds`, `spec.tolerations`
(only additions to existing tolerations) or `spec.terminationGracePeriodSeconds`
(allow it to be set to 1 if it was previously negative)
What happened:
I have applied the following yaml file. When I added a new rough field, I observed that the Pod did not respond. When I updated other fields again, sts did not respond either. I suspect that the controller was hung by some abnormal state at this time.
I found the following error in the controller log.
After step-by-step investigation, it was found that the error was reported from the following link:
https://github.com/openkruise/kruise/blob/master/pkg/controller/statefulset/stateful_pod_control.go#L190
It looks like an attempt is made to update a Pod, but in fact, K8s prohibits updating most fields of a Pod, including volume.
When I removed the following line of code, I observed that sts performed the rolling update as I expected.
https://github.com/openkruise/kruise/blob/master/pkg/controller/statefulset/stateful_pod_control.go#L160
What you expected to happen:
Modifying the PVC and VolumeMount field can trigger rolling updates normally
How to reproduce it (as minimally and precisely as possible):
Reference
Anything else we need to know?:
nothing
Environment:
kubectl version
): v1.24.6-aliyun.1The text was updated successfully, but these errors were encountered: