Answers: <p>Set the <code>KUBECONFIG</code> environment variable with a value that includes the relevant Kubernetes configuration file, the environment variable only applies to your current session/window.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-05-06T20:21:35.280Z
Answers: nice but about the same config file in `.kube/config` but a different configuration in that file?
Answers: Alexander Mills
Answers: CC BY-SA 4.0
Answers: 2019-05-06T20:25:34.657Z
Answers: I updated the OP with more details, ty
Answers: Alexander Mills
Answers: CC BY-SA 4.0
Answers: 2019-05-06T20:20:41.567Z
Answers: 2019-05-06T20:20:41.567Z
Answers: Evgeny Zislis
Body: <p>If I run <code>kubectl get svc</code>, it seems to be the same across terminal sessions - how can use a local configuration that's only loaded for my current terminal session?</p>
  
  <p>If the answer is a local config file and using KUBECONFIG env var to point to it, then how can I generate a local config file? If I use:</p>
  
  <pre><code>export KUBECONFIG=`dirname "$BASH_SOURCE"/conf`
  aws eks update-kubeconfig --profile=alex --name ignitecluster
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Content not a dictionary.</p>
  </blockquote>
  
Tags: <kubernetes><kubectl>
Title: use different kubectl configs in different terminal sessions
UserDisplayName: Alexander Mills
ThreadText: # use different kubectl configs in different terminal sessions
  
  (Asked by: username_0 on 2019-05-06)
  
  If I run `kubectl get svc`, it seems to be the same across terminal sessions - how can use a local configuration that's only loaded for my current terminal session?
  
  If the answer is a local config file and using KUBECONFIG env var to point to it, then how can I generate a local config file? If I use:
  
  ```
  export KUBECONFIG=`dirname "$BASH_SOURCE"/conf`
  aws eks update-kubeconfig --profile=alex --name ignitecluster
  
  ```
  
  I get this error:
  
  > Content not a dictionary.
  
  **Tags:** kubernetes, kubectl
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-06. Score: 1 | Accepted answer
  
  Set the `KUBECONFIG` environment variable with a value that includes the relevant Kubernetes configuration file, the environment variable only applies to your current session/window.
  
  > **Comments:**
  > **username_0**: nice but about the same config file in `.kube/config` but a different configuration in that file?  
  > **username_0**: I updated the OP with more details, ty  
  
  ---
  
  