<p>I am tyring to switch between a couple different clusters I have defined in a kubectl config file but it seems no matter what I do it defaults to the defined dev cluster. Any help is greatly appreciated.</p>
<p>Here is the config file named combined:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://zlty10129.vci.att.com:6443
  name: moks-dev-cluster
- cluster:
    insecure-skip-tls-verify: true
    server: https://zlp30531.vci.att.com:6443
  name: moks-prod-cluster
contexts:
- context:
    cluster: moks-dev-cluster
    namespace: com-att-moks-dev
    user: default-user
  name: dev
- context:
    cluster: moks-prod-cluster
    namespace: com-att-moks-prod
    user: default-user
  name: prod
current-context: prod
kind: Config
preferences: {}
users:
- name: default-user
  user:
    token: m28194@moks.att.com:enc:pass
</code></pre>
<p>And when I try to switch to prod I still get the dev context:</p>
<p><code>kubectl config --kubeconfig=combined use-context prod</code></p>
<p><code>kubectl config view</code></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://zlty10129.vci.att.com:6443
  name: default-cluster
contexts:
- context:
    cluster: default-cluster
    namespace: com-att-moks-dev
    user: default-user
  name: default-context
current-context: default-context
kind: Config
preferences: {}
users:
- name: default-user
  user:
    token: m28194@moks.att.com:enc:pass
</code></pre>
<p>I am not sure what i am doing wrong.</p>
<p>Thanks!</p>

rf guy
<p>I figured it out. I just renamed the <code>combined</code> file to <code>config</code> and it works.</p>
