Thanks Nirmal! Yes I was able to get Kubernetes functionality working with
Kubernetes 0.5.2. May be the Kubernetes client domain model was not
compatible with Kubernetes 0.2.96.

Now the proxy services are created properly and the server running inside
the container can be accessed via the proxy service. Will update with more
details soon.

Thanks

On Tue, Dec 23, 2014 at 9:48 AM, Nirmal Fernando <nirmal070...@gmail.com>
wrote:

> I think the root cause for
>
> Failed to find port for service: {{ http-9280 2014-12-22 14:11:02 +0000
> UTC  37836 } 4500 map[name:php.php.domain] map[name:php.php.domain] false
> {1 0 9280}}, no suitable port for manifest: 6220cc79-89e4-11e4-888f-
> 080027c9178c
>
> is K8s cannot find any container having the port you have given as the
> container port in the service.
>
> On Tue, Dec 23, 2014 at 9:31 AM, Nirmal Fernando <nirmal070...@gmail.com>
> wrote:
>
>> Hi,
>>
>> Please use latest Kubernetes setup v0.5.3 -
>> https://github.com/nirmal070125/vagrant-kubernetes-setup
>>
>> There's this known issue:
>> https://github.com/nirmal070125/vagrant-kubernetes-setup/issues/7
>>
>> Please do the work-around mentioned there.
>>
>> I am not in a position to test Stratos code now, but service creation and
>> replication controller creation works fine for me with the Live tests.
>>
>> Please check the live tests to find out how to correctly define the
>> Service proxy with latest K8s:
>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.kubernetes.client/src/test/java/org/apache/stratos/kubernetes/client/live/KubernetesApiClientLiveTest.java#L279
>>
>> kubecfg list services
>>
>> Name                Labels              Selector
>>         IP                  Port
>>
>> ----------          ----------          ----------
>>         ----------          ----------
>>
>> kubernetes-ro
>> component=apiserver,provider=kubernetes   10.0.0.142          80
>>
>> kubernetes
>> component=apiserver,provider=kubernetes   10.0.0.234          443
>>
>> nirmal-service      name=nirmal         name=nirmal
>>         10.0.0.31           5000
>>
>>
>>
>> kubecfg -json list services
>>
>>
>> {"kind":"ServiceList","creationTimestamp":null,"selfLink":"/api/v1beta1/services","resourceVersion":1684,"apiVersion":"v1beta1","items":[{"id":"nirmal-service","uid":"3beca374-8a57-11e4-b52f-080027de3c2e","creationTimestamp":"2014-12-23T03:53:20Z","selfLink":"/api/v1beta1/services/nirmal-service","resourceVersion":1658,"namespace":"default","port":5000,"protocol":"TCP","labels":{"name":"nirmal"},"selector":{"name":"nirmal"},"publicIPs":["172.16.8.100"],"containerPort":"8379","portalIP":"10.0.0.31"},{"id":"kubernetes-ro","uid":"dd70ba91-8a50-11e4-b52f-080027de3c2e","creationTimestamp":"2014-12-23T03:07:44Z","selfLink":"/api/v1beta1/services/kubernetes-ro","resourceVersion":14,"namespace":"default","port":80,"protocol":"TCP","selector":{"component":"apiserver","provider":"kubernetes"},"containerPort":0,"portalIP":"10.0.0.142"},{"id":"kubernetes","uid":"dd718833-8a50-11e4-b52f-080027de3c2e","creationTimestamp":"2014-12-23T03:07:44Z","selfLink":"/api/v1beta1/services/kubernetes","resourceVersion":16,"namespace":"default","port":443,"protocol":"TCP","selector":{"component":"apiserver","provider":"kubernetes"},"containerPort":0,"portalIP":"10.0.0.234"}]}
>>
>> kubecfg list pods
>>
>> Name                                   Image(s)            Host
>>       Labels              Status
>>
>> ----------                             ----------          ----------
>>       ----------          ----------
>>
>> f55b4482-8a56-11e4-b52f-080027de3c2e   gurpartap/redis     172.16.8.100/
>>       name=nirmal         Running
>>
>> f55a6185-8a56-11e4-b52f-080027de3c2e   gurpartap/redis     172.16.8.100/
>>       name=nirmal         Running
>>
>>
>>
>> kubecfg list replicationControllers
>>
>> Name                Image(s)            Selector            Replicas
>>
>> ----------          ----------          ----------          ----------
>>
>> nirmalController    gurpartap/redis     name=nirmal         2
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Dec 23, 2014 at 12:16 AM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Thanks Lakmal, I'm now investigating the reason for the initial error
>>> which was raised with Kubernetes v0.2-96.
>>>
>>> Thanks
>>>
>>> On Mon, Dec 22, 2014 at 11:45 PM, Lakmal Warusawithana <lak...@wso2.com>
>>> wrote:
>>>
>>>> My kubernetes setup used m2 is
>>>>
>>>> Kubernetes v0.2-96-gcc7999c00a40df
>>>>
>>>> On Mon, Dec 22, 2014 at 11:22 PM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> I tried the same flow with Kubernetes 0.5.2 and found a problem witih
>>>>> Fannel:
>>>>>
>>>>> Dec 22 17:49:36 minion-1 systemd[1025]: Failed at step EXEC spawning
>>>>> /opt/bin/flannel: No such file or directory
>>>>> Dec 22 17:49:36 minion-1 systemd[1]: flannel.service: main process
>>>>> exited, code=exited, status=203/EXEC
>>>>> Dec 22 17:49:36 minion-1 systemd[1]: Unit flannel.service entered
>>>>> failed state.
>>>>> Dec 22 17:49:36 minion-1 systemd[1]: flannel.service failed.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Mon, Dec 22, 2014 at 8:26 PM, Imesh Gunaratne <im...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> I see the below error in Kubernetes log after creating a service:
>>>>>>
>>>>>> Failed to find port for service: {{ http-9280 2014-12-22 14:11:02
>>>>>> +0000 UTC  37836 } 4500 map[name:php.php.domain] map[name:php.php.domain]
>>>>>> false {1 0 9280}}, no suitable port for manifest:
>>>>>> 6220cc79-89e4-11e4-888f-080027c9178c
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lakmal Warusawithana
>>>> Vice President, Apache Stratos
>>>> Director - Cloud Architecture; WSO2 Inc.
>>>> Mobile : +94714289692
>>>> Blog : http://lakmalsview.blogspot.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to