You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Pubudu Gunatilaka <pu...@wso2.com> on 2015/06/02 17:23:53 UTC

Install Stratos with Kubernetes on EC2

Hi Devs,

I am trying to install Stratos with Kubernetes on EC2 and following [1]. I
used region specific CoreOs alpha channel AMI in [2] and I was able to
spawn a master and 3 minions on EC2.  I also 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.

*channel 2: open failed: connect failed: Connection refused*
*Couldn't get available api versions from server: Get
http://localhost:8080/api <http://localhost:8080/api>: EOF*

What could be the reason for this error? As I understood kubernetes master
node is refusing the connection. I did not change anything on master.yaml
file and kept all values as default. But I could ssh to kubernetes master
node as well.

Please note that my Kubectl client runs on a EC2 instance. Any help on this
is greatly appreciated.

[1] -
https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Install+Stratos+with+Kubernetes+on+EC2

[2] - https://coreos.com/docs/running-coreos/cloud-providers/ec2/

Thank you!
-- 

*Pubudu Gunatilaka*
Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
mobile:  +94 77 4078049

Re: Install Stratos with Kubernetes on EC2

Posted by Pubudu Gunatilaka <pu...@wso2.com>.
I used CoreOs alpha release. After having a discussion with kubernetes
google group, I found the root cause for this. I used their latest
master.yaml file and they have replaced a flag *portal-net* with
*service-cluster-ip-range* in the Kubernetes Api server service. Due to
that, api server hasn't started up I got the i/o timeout. After changing
the flag to the previous flag, it worked.

On Sat, Jun 6, 2015 at 12:08 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Such issues could occur due to new releases of CoreOS and Kubernetes. The
> latest stable version I used is with CoreOS 681 and Kubernetes 0.17.0.
>
> On Tue, Jun 2, 2015 at 11:33 PM, Pubudu Gunatilaka <pu...@wso2.com>
> wrote:
>
>> I checked the ports. They are opened. But when I did ssh to the
>> kubernetes master, it indicates  *oem-cloudinit.service* as a failed
>> unit. I think this is why I can't access the service as it is downed.
>>
>> On Tue, Jun 2, 2015 at 10:27 PM, Sajith Kariyawasam <sa...@wso2.com>
>> wrote:
>>
>>> is it because of port 8080 is not opened for access?
>>>
>>> On Tue, Jun 2, 2015 at 10:23 PM, Pubudu Gunatilaka <pu...@wso2.com>
>>> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> Yes, I hadn't set the KUBERNETES_MASTER environment variable. But when
>>>> i did that, still getting the error as below.
>>>>
>>>> *Couldn't get available api versions from server: Get
>>>> http://<My-kuberbetes-master-IP>:8080/api: dial tcp *
>>>> *<My-kuberbetes-master-IP>**:8080: i/o timeout*
>>>>
>>>> I tried through the browser as well. But didn't workout.
>>>> What could be the reason for this?
>>>>
>>>> Thank you!
>>>>
>>>>
>>>> On Tue, Jun 2, 2015 at 9:34 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> me too got the same error which is solved by setting the env variable
>>>>> Imesh mentioned.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Pubudu Gunatilaka*
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean.enterprise.middleware
>>>> mobile:  +94 77 4078049
>>>>
>>>
>>>
>>>
>>> --
>>> Sajith Kariyawasam
>>> *Committer and PMC member, Apache Stratos, *
>>> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
>>> *Mobile: 0772269575 <0772269575>*
>>>
>>
>>
>>
>> --
>>
>> *Pubudu Gunatilaka*
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> mobile:  +94 77 4078049
>>
>
>
>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 

*Pubudu Gunatilaka*
Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
mobile:  +94 77 4078049

Re: Install Stratos with Kubernetes on EC2

Posted by Imesh Gunaratne <im...@apache.org>.
Such issues could occur due to new releases of CoreOS and Kubernetes. The
latest stable version I used is with CoreOS 681 and Kubernetes 0.17.0.

On Tue, Jun 2, 2015 at 11:33 PM, Pubudu Gunatilaka <pu...@wso2.com> wrote:

> I checked the ports. They are opened. But when I did ssh to the kubernetes
> master, it indicates  *oem-cloudinit.service* as a failed unit. I think
> this is why I can't access the service as it is downed.
>
> On Tue, Jun 2, 2015 at 10:27 PM, Sajith Kariyawasam <sa...@wso2.com>
> wrote:
>
>> is it because of port 8080 is not opened for access?
>>
>> On Tue, Jun 2, 2015 at 10:23 PM, Pubudu Gunatilaka <pu...@wso2.com>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> Yes, I hadn't set the KUBERNETES_MASTER environment variable. But when
>>> i did that, still getting the error as below.
>>>
>>> *Couldn't get available api versions from server: Get
>>> http://<My-kuberbetes-master-IP>:8080/api: dial tcp *
>>> *<My-kuberbetes-master-IP>**:8080: i/o timeout*
>>>
>>> I tried through the browser as well. But didn't workout.
>>> What could be the reason for this?
>>>
>>> Thank you!
>>>
>>>
>>> On Tue, Jun 2, 2015 at 9:34 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> me too got the same error which is solved by setting the env variable
>>>> Imesh mentioned.
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> *Pubudu Gunatilaka*
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean.enterprise.middleware
>>> mobile:  +94 77 4078049
>>>
>>
>>
>>
>> --
>> Sajith Kariyawasam
>> *Committer and PMC member, Apache Stratos, *
>> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
>> *Mobile: 0772269575 <0772269575>*
>>
>
>
>
> --
>
> *Pubudu Gunatilaka*
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean.enterprise.middleware
> mobile:  +94 77 4078049
>



-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Install Stratos with Kubernetes on EC2

Posted by Pubudu Gunatilaka <pu...@wso2.com>.
I checked the ports. They are opened. But when I did ssh to the kubernetes
master, it indicates  *oem-cloudinit.service* as a failed unit. I think
this is why I can't access the service as it is downed.

On Tue, Jun 2, 2015 at 10:27 PM, Sajith Kariyawasam <sa...@wso2.com> wrote:

> is it because of port 8080 is not opened for access?
>
> On Tue, Jun 2, 2015 at 10:23 PM, Pubudu Gunatilaka <pu...@wso2.com>
> wrote:
>
>> Hi Devs,
>>
>> Yes, I hadn't set the KUBERNETES_MASTER environment variable. But when i
>> did that, still getting the error as below.
>>
>> *Couldn't get available api versions from server: Get
>> http://<My-kuberbetes-master-IP>:8080/api: dial tcp *
>> *<My-kuberbetes-master-IP>**:8080: i/o timeout*
>>
>> I tried through the browser as well. But didn't workout.
>> What could be the reason for this?
>>
>> Thank you!
>>
>>
>> On Tue, Jun 2, 2015 at 9:34 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> me too got the same error which is solved by setting the env variable
>>> Imesh mentioned.
>>>
>>
>>
>>
>> --
>>
>> *Pubudu Gunatilaka*
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> mobile:  +94 77 4078049
>>
>
>
>
> --
> Sajith Kariyawasam
> *Committer and PMC member, Apache Stratos, *
> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
> *Mobile: 0772269575*
>



-- 

*Pubudu Gunatilaka*
Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
mobile:  +94 77 4078049

Re: Install Stratos with Kubernetes on EC2

Posted by Sajith Kariyawasam <sa...@wso2.com>.
is it because of port 8080 is not opened for access?

On Tue, Jun 2, 2015 at 10:23 PM, Pubudu Gunatilaka <pu...@wso2.com> wrote:

> Hi Devs,
>
> Yes, I hadn't set the KUBERNETES_MASTER environment variable. But when i
> did that, still getting the error as below.
>
> *Couldn't get available api versions from server: Get
> http://<My-kuberbetes-master-IP>:8080/api: dial tcp *
> *<My-kuberbetes-master-IP>**:8080: i/o timeout*
>
> I tried through the browser as well. But didn't workout.
> What could be the reason for this?
>
> Thank you!
>
>
> On Tue, Jun 2, 2015 at 9:34 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> me too got the same error which is solved by setting the env variable
>> Imesh mentioned.
>>
>
>
>
> --
>
> *Pubudu Gunatilaka*
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean.enterprise.middleware
> mobile:  +94 77 4078049
>



-- 
Sajith Kariyawasam
*Committer and PMC member, Apache Stratos, *
*WSO2 Inc.; http://wso2.com <http://wso2.com>*
*Mobile: 0772269575*

Re: Install Stratos with Kubernetes on EC2

Posted by Pubudu Gunatilaka <pu...@wso2.com>.
Hi Devs,

Yes, I hadn't set the KUBERNETES_MASTER environment variable. But when i
did that, still getting the error as below.

*Couldn't get available api versions from server: Get
http://<My-kuberbetes-master-IP>:8080/api: dial tcp *
*<My-kuberbetes-master-IP>**:8080: i/o timeout*

I tried through the browser as well. But didn't workout.
What could be the reason for this?

Thank you!


On Tue, Jun 2, 2015 at 9:34 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> me too got the same error which is solved by setting the env variable
> Imesh mentioned.
>



-- 

*Pubudu Gunatilaka*
Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
mobile:  +94 77 4078049

Re: Install Stratos with Kubernetes on EC2

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

me too got the same error which is solved by setting the env variable Imesh
mentioned.

Re: Install Stratos with Kubernetes on EC2

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Pubudu,

May be you have not set the KUBERNETES_MASTER environment variable properly
or the SSH tunnel has not established.

On Tue, Jun 2, 2015 at 4:23 PM, Pubudu Gunatilaka <pu...@wso2.com> wrote:

> Hi Devs,
>
> I am trying to install Stratos with Kubernetes on EC2 and following [1]. I
> used region specific CoreOs alpha channel AMI in [2] and I was able to
> spawn a master and 3 minions on EC2.  I also 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.
>
> *channel 2: open failed: connect failed: Connection refused*
> *Couldn't get available api versions from server: Get
> http://localhost:8080/api <http://localhost:8080/api>: EOF*
>
> What could be the reason for this error? As I understood kubernetes master
> node is refusing the connection. I did not change anything on master.yaml
> file and kept all values as default. But I could ssh to kubernetes master
> node as well.
>
> Please note that my Kubectl client runs on a EC2 instance. Any help on
> this is greatly appreciated.
>
> [1] -
> https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Install+Stratos+with+Kubernetes+on+EC2
>
> [2] - https://coreos.com/docs/running-coreos/cloud-providers/ec2/
>
> Thank you!
> --
>
> *Pubudu Gunatilaka*
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean.enterprise.middleware
> mobile:  +94 77 4078049
>



-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos