Run Kubernetes on EC2

6/3/2015

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 Kubernets API.

But when I try kubectl api-versions command, I am getting following error.

Couldn't get available api versions from server: Get http://MyIP:8080/api: dial tcp MyIP:8080: connection refused

MyIP - this has set accordingly.

What could be the reason for this?

-- Pubci
amazon-ec2
coreos
kubernetes
ssh

1 Answer

6/7/2015

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.

-- Pubci
Source: StackOverflow