<p>I have provisioned kubernetes cluster in Azure Cloud(using CoreOS) using the guide <a href="http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/azure/README.html" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/azure/README.html</a></p>

<p>Its working fine, now I want to run kubectl commands from my local machine(I use Mac). for that I installed kubernetes-cli with brew, but I am not able to connect to the remote kubernetes cluster. When I run "kubectl version",</p>

<pre><code>user$  kubectl version 
Client Version: version.Info{Major:"1", Minor:"1",GitVersion:"v1.1.2+3085895",GitCommit:"3085895b8a70a3d985e9320a098e74f545546171",GitTreeState:"not a git tree"} 
error: couldn't read version from server: Get http://localhost:8080/api: dial tcp [::1]:8080: getsockopt: connection refused
</code></pre>

<p>how to connect to the kubernetes cluster via SSH or so?</p>

<p>Note: manually I am able to ssh to the kubernetes nodes and run kubectl commands there. </p>

<p>The mechanism for copying the configuration file necessary to get remote access to your cluster is described in <a href="https://kubernetes.io/docs/user-guide/sharing-clusters/" rel="nofollow noreferrer">Sharing Cluster Access</a>. You may need to manually tweak <code>~/.kube/config</code> after copying if it contains an endpoint that isn't remotely reachable (a non-routable IP) and/or open up firewall access to your apiserver running in Azure. Otherwise, once you get the local config file in place you should be all set. </p>
