<p>I'm trying to set oidc credentials and got stuck, because the client-secret contains a comma:</p>
<pre><code>kubectl config set-credentials user@cluster  \
    --auth-provider=oidc  \
    --auth-provider-arg='idp-issuer-url=https://host'  \
    --auth-provider-arg='client-id=xxx'  \
    --auth-provider-arg='client-secret=AAAA,BBBB' 
</code></pre>
<p>This results in the following error:</p>
<pre><code>error: Error: invalid auth-provider-arg format: BBBB
</code></pre>
<p>Is there a way to escape the char?</p>

user2534584
<p>Mentioning the special characters in a single quote is an exact work around for <a href="https://kubernetes.io/docs/concepts/configuration/secret/#use-case-pods-with-prod-test-credentials" rel="nofollow noreferrer">escaping special characters</a> but in this case as comma is present it's considered as <a href="https://github.com/int128/kubelogin/blob/master/docs/standalone-mode.md#extra-scopes" rel="nofollow noreferrer">extra-scope</a> (Scopes to request to the provider (comma separated)).</p>
<p>Currently kubectl does not accept multiple scopes, so you need to edit the kubeconfig as following:</p>
<pre><code>$ kubectl config set-credentials keycloak --auth-provider-arg extra-scopes=SCOPES
sed -i ' ' -e s/SCOPES/email,profile/ $KUBECONFIG
</code></pre>
