<p>I am trying to run kubernetes on EC2 and I used CoreOs alpha channel ami.I configured Kubectl ssh tunnel for the communication between Kubectl client and Kubernetes API.</p>
<p>But when I try <strong>kubectl api-versions</strong> command, I am getting following error.</p>
<p><strong>Couldn't get available api versions from server: Get http://MyIP:8080/api: dial tcp MyIP:8080: connection refused</strong></p>
<p>MyIP - this has set accordingly.</p>
<p>What could be the reason for this?</p>

<p>Reason for this issue was that I haven't set the kubernetes_master environment variable properly. As there is a ssh tunnel between the kubectl client and API, kubernetes master environment variable should be set to localhost.</p>
