<p dir="auto">This way we'll be able to easily compare accuracy of the benchmark and make reduce the code duplication.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wojtek-t/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wojtek-t">@wojtek-t</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hongchaodeng/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hongchaodeng">@hongchaodeng</a></p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<p dir="auto">kubectl exit codes<br>
kubectl return codes</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>): 1.3.4</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: AWS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Debian Jessie</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):  Linux ip-172-20-42-63 3.16.0-4-amd64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>:  KOPS</li>
<li><strong>Others</strong>: n/a</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl config use-context asdfasdf
no context exists with the name: &quot;asdfasdf&quot;.
$ echo $?
0"><pre class="notranslate"><code class="notranslate">$ kubectl config use-context asdfasdf
no context exists with the name: "asdfasdf".
$ echo $?
0
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
When kubectl fails, it should set a non-zero exit code. This way scripts calling kubectl can respond to failure.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl config use-context asdfasdf
no context exists with the name: &quot;asdfasdf&quot;.
$ echo $?
0"><pre class="notranslate"><code class="notranslate">$ kubectl config use-context asdfasdf
no context exists with the name: "asdfasdf".
$ echo $?
0
</code></pre></div>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p>