Statefulset image upgrade forbidden?



I was trying to upgrade a statefulset workload and its giving the following error. Arent we able to upgrade images of all set of objects ? Or is it normal?

Validation failed in API: StatefulSet.apps “elasticsearch-0” is invalid: spec: Forbidden: updates to statefulset spec for fields other than ‘replicas’, ‘template’, and ‘updateStrategy’ are forbidden.



@Listener_me, Are you still working with this. If so I’d be happy to help. That error you’re getting is coming from Kubernetes. Apparently we’re violating the statefulset API spec. I’ll look into this, you may have found a bug.


I am still trying to figure out the issue. If I change it to depoyment instead of statefulset, it will work. But I want to use the advantage of having statefulset including the names of pods and stuffs. It would be great if you can help. I am using rancher version 2.1.1


How are you doing this update?

I get this error for example when I run 'kubectl edit ’ because those fields cannot be modified ‘dynamically’ like this.

I usually just update the original yaml file (or exported copy), run ‘kubectl apply -f’ and it updates fine.