error: At least one of apiVersion, kind and name was changed

5/30/2019

Why am I getting an error when I try to change the apiVersion of a deployment via kubectl edit deployment example ?

Do I have to delete and recreate the object?

-- Chris Stryczynski
kubernetes

1 Answer

5/31/2019

You're getting this because there are only certain attributes of a resource that you may change once it's created. ApiVersion, Kind, and Name are some of the prime identifiers of a resource so they can't be changed without deleting/recreating them.

-- Grant David Bachman
Source: StackOverflow