<p>It's pretty standard spark-submit action, what's weird is that I got 401 from time to time, if I just wait a few minute, I can run again, until next time I got a 401. </p>

<p>it's very similar to this issue 
<a href="https://jira.apache.org/jira/browse/SPARK-24227" rel="nofollow noreferrer">https://jira.apache.org/jira/browse/SPARK-24227</a></p>

<p>I'm just wondering if I'm not setting the GOOGLE_APPLICATION_CREDENTIAL right when submitting, but at the very beginning I haven't set any credential and can still run.</p>

<p>Anyone has similar issues?</p>

dex
<p>It's a subtle bug with Spark couldnt refresh the access token. One work around is:</p>

<ul>
<li>Run a dummy kubectl command to refresh access token. E.g: <strong>kubectl get namespace</strong></li>
</ul>
