Is there a clear list of which fields of each API object are mutable?


#1

Some fields in the podSpec are mutable but most are not according to: https://github.com/kubernetes/kubernetes/issues/70906#issuecomment-437621580. Is there an easy way to find exactly which fields in each API type is mutable?

The doc for kubectl patch suggests browsing the API for finding which fields are mutable: “Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/api-reference/v1/definitions.html to find if a field is mutable.” But I can’t tell if a field is mutable by reading the descriptions.


#2

Using the swagger docs https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#pod-v1-core It doesn’t specifically say if an object is mutable or immutable but gives more/better information around what the objects are and what the server expects.


#3

Thanks @ralph. Yes the swagger docs are quite useful but as you said have little information on what fields are updatable/mutable. The tolerations field in pod-spec for example is mutable but from the description we just get “If specified, the pod’s tolerations.” Not complaining, just asking if this information is perhaps maintained somewhere else.