<p dir="auto">Hi,</p>
<p dir="auto">I just noticed that the nodes on our (AWS) cluster also have the region in the zone label:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="failure-domain.beta.kubernetes.io/region=eu-west-1
failure-domain.beta.kubernetes.io/zone=eu-west-1a"><pre class="notranslate"><code class="notranslate">failure-domain.beta.kubernetes.io/region=eu-west-1
failure-domain.beta.kubernetes.io/zone=eu-west-1a
</code></pre></div>
<p dir="auto">This doesn't make sense to me as it prevents you from using the zone label as a selector without knowing the region upfront (which is not always the case).</p>
<p dir="auto">If for example you want to duplicate a k8s cluster on a different region it would require me to edit the manifest and change the zone label everywhere to contain the new region.</p>
<p dir="auto">So say you have 2 nodes in separate availability zones and want to deploy a pod in availability zone <strong>a</strong> I would  expect to just specify the zone as <strong>a</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    nodeSelector:
        failure-domain.beta.kubernetes.io/zone=a"><pre class="notranslate"><code class="notranslate">    nodeSelector:
        failure-domain.beta.kubernetes.io/zone=a
</code></pre></div>
<p dir="auto">If for some reason I need to also specify the region you can alway use the <em>failure-domain.beta.kubernetes.io/region</em> label.</p>
<p dir="auto">Several things do or will use a <code class="notranslate">.kubernetes_auth</code> file:</p>
<ul dir="auto">
<li>kubectl</li>
<li>cmd/e2e/e2e.go</li>
<li>kubecfg</li>
<li>I'd like kubelet to use it too.</li>
<li>I'd like things in pods that talk to the API to use it too (e.g scheduler running in a pod on a non-master node).</li>
</ul>
<p dir="auto">They use different ways to specify its location:</p>
<ul dir="auto">
<li>kubectl has a persistent flag called <code class="notranslate">auth-path</code></li>
<li>e2e test uses <code class="notranslate">--auth_config</code></li>
<li>kubecfg uses <code class="notranslate">--auth</code></li>
</ul>
<p dir="auto">There are several routines for loading the file:</p>
<ul dir="auto">
<li>kubecfg uses <code class="notranslate">kubecfg.LoadAuthInfo</code>, which does prompting for user/pass if the file does not exist</li>
<li>kubectl uses <code class="notranslate">kubectl.LoadAuthInfo</code>, which is identical to kubecfg code.</li>
<li>e2e test uses ``kubecfg.LoadAuthInfo`</li>
</ul>
<p dir="auto">There are several format definitions:</p>
<ul dir="auto">
<li>kubecfg uses <code class="notranslate">kubecfg.AuthInfo</code></li>
<li>kubectl uses <code class="notranslate">kubectl.AuthInfo</code> which is identical to kubcfg's
<ul dir="auto">
<li>e2e test uses <code class="notranslate">kubecfg.AuthInfo</code> indirectly.<br>
The Marshalled file contents then get copied from the kubec*.AuthInfo into the almost-but-not-quite same-named fields of <code class="notranslate">Config</code> in <code class="notranslate">pkg/client</code>.</li>
</ul>
</li>
</ul>
<p dir="auto">Questions:</p>
<ol dir="auto">
<li>Can we standardize on a flag name for the path to the .kubernetes_auth file?</li>
<li>Should there be a single format for a .kubernetes_auth file?</li>
<li>Should the go type that defines that format be the same file or a copy of the code in pkg/client?  If the former, should the type in pkg/client be put in a less obscure location than pkg/client/helpers.go.</li>
<li>Should there be a single parser for a  .kubernetes_auth file, to also be used by kubelet, scheduler, etc?</li>
</ol>