<p>I am trying to create a service account using helm on Kubernetes as described here:</p>

<p><a href="https://tutorials.kevashcraft.com/k8s/install-helm/" rel="nofollow noreferrer">https://tutorials.kevashcraft.com/k8s/install-helm/</a></p>

<p>When I execute the following line:</p>

<p>kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'</p>

<p>I get an error:</p>

<p>Error from server (BadRequest): invalid character 's' looking for beginning of object key string</p>

<p>Can someone give me some guidance as to what is wrong?</p>

<p>Thanks!</p>

<p>Try <code>kubectl patch deploy --namespace kube-system tiller-deploy -p "{\"spec\":{\"template\":{\"spec\":{\"serviceAccount\":\"tiller\"}}}}"</code> i.e. using outer double-quotes and escaping the inner double-quotes. There's a <a href="https://github.com/minishift/minishift/issues/1273#issuecomment-323127597" rel="nofollow noreferrer">github issue</a> where somebody hit the same error in a different context and was able to resolve it like this.</p>

<p>Edit: MrTouya determined that in this case what worked was <code>kubectl patch deploy --namespace kube-system tiller-deploy -p '{\"spec\":{\"template\":{\"spec\":{\"serviceAccount\":\"tiller\"}}}}'</code></p>
