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

<p>Do I have to delete and recreate the object?</p>

<p>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.</p>
