<p>On my vagrant VM,I created kops cluster</p>

<pre><code> kops create cluster \
       --state "s3://kops-state-1000" \
       --zones "eu-central-1a","eu-central-1b" \
       --master-count 3 \
       --master-size=t2.micro \
       --node-count 2 \
       --node-size=t2.micro \
       --ssh-public-key ~/.ssh/id_rsa.pub\
       --name jh.mydomain.com \
       --yes
</code></pre>

<p>I can list cluster with kops get cluster</p>

<pre><code>jh.mydomain.com aws eu-central-1a,eu-central-1b
</code></pre>

<p>The problem is that I can not find .kube repository. When I go for </p>

<pre><code>kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
</code></pre>

<p>Is this somehow related to my virtual box deployment or not? I am aware that  the command <em>kubectl</em> works on the master node because that's where <em>kube-apiserver</em> runs. Does this mean that my deployment is workers node?</p>

<p>I tried what Vasily suggested</p>

<pre><code>kops export kubecfg $CLUSTER_NAME
W0513 15:44:17.286965    3279 root.go:248] no context set in kubecfg

--name is required
</code></pre>

Richard Rublev
<p>It seems that kops didn't configure the context of the cluster in your machine
You can try the following command:</p>

<pre><code>kops export kubecfg jh.mydomain.com
</code></pre>

<p>You can also find the <em>config</em> file at S3->kops-state-1000->jh.mydomain.com->config<br>
After downloading the config file you can try:</p>

<pre><code>kubectl --kubeconfig={config you downloaded} version
</code></pre>

<p>Also, it's kinda unrelated to your question, but it may be not a bad idea to have a look at <a href="http://blog.arungupta.me/gossip-kubernetes-aws-kops/" rel="nofollow noreferrer">gossip-based kubernetes cluster</a>. To try that feature, you just need to create a cluster with kobs using <code>--name=something.k8s.local</code></p>
