<p>I have service account name:  <code>myservice</code> </p>

<pre><code>$ kubectl get serviceaccount 
NAME        SECRETS   AGE
default     1         15d
myservice   1         15d


$ kubectl get serviceaccount myservice -o yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  creationTimestamp: 2018-06-13T12:41:18Z
  name: myservice
  namespace: default
  ...
</code></pre>

<p>I want to change the service's namespace <code>default</code> to <code>development</code>.<br>
I tried to edit it with:<br>
<code>kubectl edit serviceaccount myservice</code>  </p>

<p>After saving it I received:  </p>

<pre><code>A copy of your changes has been stored to "/tmp/kubectl-edit-gjae6.yaml"
error: the namespace from the provided object "development" does not match the namespace "default". You must pass '--namespace=development' to perform this operation.
</code></pre>

<p>So I tried like they wrote and it still didn't work:  </p>

<pre><code>$ kubectl edit serviceaccount myservice --namespace=development
Error from server (NotFound): serviceaccounts "myservice" not found
</code></pre>

<p>The namespace <code>development</code> is exist and also the service <code>myservice</code>.      </p>

E235
<p>It seems you should create new myservice SA in development NS instead modifying existing SA in default namespace. Create new myservice in development NS, then remove one in default NS. The error cause the nonexistent myservice even is in development NS.</p>
