Hi, Pubudu

Thanks for your quick response,

I found an issue: the docker image tag is a wrong tag ( in our 4.1.5
kubernetes sample code ):
"imageId": "stratos/php:4.1.5", can not be found in docker hub, after
changed to "imageId": "stratos/php:4.1.4", the php container can be
initialized, but can not be activated in Stratos Topology

Checked with kubectl get pod, it's already activated.

Want to know if Stratos Topology monitor the service/pod status or not?  If
not, how can be activated?

Thanks
-D





On Mon, Feb 1, 2016 at 11:25 PM, Pubudu Gunatilaka <pubu...@wso2.com> wrote:

> Hi David,
>
> Stratos 4.1.5 supports Kubernetes 1.0.3.
>
> This error log could encounter due to following reasons.
>
> 1. Make sure you have pulled the correct php docker image in kubernetes
> nodes. (except k8 master node)
> Docker image version is specified in the php cartridge.
>
> 2. If the docker image is there, try executing 'docker ps' in k8 nodes.
> Basically you will have to find correct k8 host node for the particular
> pod. 'docker ps' will show the reason for not starting the container.
>
> Thank you!
>
> On Tue, Feb 2, 2016 at 12:31 PM, David Hbase <davidhb...@gmail.com> wrote:
>
>> Hi, Imesh
>>
>> Thanks for your reply. I follow the doc to setup the Stratos-Kubernetes
>> cluster, but can not have the topology activated.
>>
>> The kubernetes version is: kubernetes-1.0.3-0.2.gitb9a88a7.el7.x86_64
>>
>> Stratos version: is 4.1.5
>>
>> Do we have to upgrade kubernetes to 1.1 or later version?
>>
>> Is there any suggestion?
>>
>> Thanks
>> -D
>>
>> {org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas} -
>> Could not start container: [application] single-cartridge-app [cartridge]
>> php [member]
>> single-cartridge-app.my-php.php.domain2393142c-70e0-4c51-8ff0-bcbdd234c1fc
>> java.lang.RuntimeException: Pod status did not change to running within
>> 60 sec: [application] single-cartridge-app [cartridge] php [member]
>> single-cartridge-app.my-php.php.domain2393142c-70e0-4c51-8ff0-bcbdd234c1fc
>> [pod] pod-1
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.waitForPodToBeActivated(KubernetesIaas.java:347)
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startContainer(KubernetesIaas.java:234)
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startInstance(KubernetesIaas.java:127)
>>     at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:99)
>>     at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:67)
>>     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>     at java.lang.Thread.run(Thread.java:745)
>> TID: [0] [STRATOS] [2016-01-28 01:14:47,976] ERROR
>> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>> Could not start instance: [cartridge-type] php [cluster-id]
>> single-cartridge-app.my-php.php.domain
>> java.lang.RuntimeException: Could not start container: [application]
>> single-cartridge-app [cartridge] php [member]
>> single-cartridge-app.my-php.php.domain2393142c-70e0-4c51-8ff0-bcbdd234c1fc
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startContainer(KubernetesIaas.java:248)
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startInstance(KubernetesIaas.java:127)
>>     at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:99)
>>     at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:67)
>>     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>     at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.lang.RuntimeException: Pod status did not change to
>> running within 60 sec: [application] single-cartridge-app [cartridge] php
>> [member]
>> single-cartridge-app.my-php.php.domain2393142c-70e0-4c51-8ff0-bcbdd234c1fc
>> [pod] pod-1
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.waitForPodToBeActivated(KubernetesIaas.java:347)
>>     at
>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startContainer(KubernetesIaas.java:234)
>>     ... 6 more
>>
>>
>> On Wed, Jan 27, 2016 at 1:44 AM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi David,
>>>
>>> On Tue, Jan 26, 2016 at 8:28 PM, David Hbase <davidhb...@gmail.com>
>>>  wrote:
>>>
>>>> Hi, Imesh
>>>>
>>>> I have realized the tenancy routing service, but still issues with
>>>> Kubernetes. Would like to know if there any updated kubernetes document?
>>>> etc:
>>>>
>>>
>>> AFAIK the documentation is updated, what were the issues you got?
>>>
>>>>
>>>> 1. Auto scaling with Kubernetes? ( Dynamic add the minions without
>>>> interrupt the curretn running services ?)
>>>>
>>>
>>> Kubernetes (K8S) nodes can be autoscaled by creating a separate
>>> composite application for K8S. Then another application can be created for
>>> the required product to be run on the above K8S cluster. However dynamic
>>> load balancing would be a problem for the pods that run on K8S because
>>> Stratos topology does not get updated with Node IPs when K8S nodes are
>>> autoscaled.
>>>
>>>
>>>> 2. Application Topology can display the service and pods in the
>>>> Kubernetes cluster?
>>>>
>>>
>>> No, currently the topology view in the Stratos UI does not show services
>>> or pords. However Kubernetes Cockpit UI can be used for this.
>>>
>>> Thanks
>>>
>>> On Wed, Jan 27, 2016 at 2:40 PM, David Hbase <davidhb...@gmail.com>
>>> wrote:
>>>
>>>> Thanks Chamila,
>>>>
>>>> Got great answers with the Kubernetes auto scaling (via node v 1.1 and
>>>> or node). But would like to know what's the Stratos auto scaling functions
>>>> with Kubernetes?
>>>>
>>>> etc: in Stratos we setup the auto scaling policy for the kubernetes
>>>> cluster, when and how can this auto scaling policy work? ( will scaling the
>>>> new pod or node ? )
>>>>
>>>> Thanks
>>>> -D
>>>>
>>>> On Tue, Jan 26, 2016 at 11:16 AM, Chamila De Alwis <chami...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi David,
>>>>>
>>>>> On Tue, Jan 26, 2016 at 8:28 PM, David Hbase <davidhb...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> 1. Auto scaling with Kubernetes? ( Dynamic add the minions without
>>>>>> interrupt the curretn running services ?)
>>>>>>
>>>>> In Kubernetes, the Node Controller is the component in charge of
>>>>> registration and revocation of Nodes (minions) in a cluster. However as 
>>>>> the
>>>>> Kubernetes documentation states [1], it doesn't automatically provision a
>>>>> new node, simply performing the registry task for the list of nodes.
>>>>>
>>>>> Therefore, any autoscaling of Nodes would have to be done at a
>>>>> different layer, based on metrics like CPU usage. CloudWatch for EC2 or
>>>>> Heat for OpenStack are few examples of achieving this. Nodes will have to
>>>>> be configured to auto register with the proxy.
>>>>>
>>>>> If you're looking for Pod autoscaling, this is already implemented in
>>>>> Kubernetes 1.1 [2]. Autoscaling is based on CPU usage.
>>>>>
>>>>> 2. Application Topology can display the service and pods in the
>>>>>> Kubernetes cluster?
>>>>>
>>>>> In Stratos, the Application Topology is the view of the Composite
>>>>> Application deployment. It doesn't show the IaaS specific details such as
>>>>> Services and Pods. These details will have to be retrieved from the
>>>>> Kube-UI.
>>>>>
>>>>> [1] - http://kubernetes.io/v1.1/docs/admin/node.html#node-controller
>>>>> [2] -
>>>>> http://kubernetes.io/v1.1/docs/user-guide/horizontal-pod-autoscaler.html
>>>>>
>>>>>
>>>>> Regards,
>>>>> Chamila de Alwis
>>>>> Committer and PMC Member - Apache Stratos
>>>>> Software Engineer | WSO2 | +94772207163
>>>>> Blog: code.chamiladealwis.com
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Senior Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>
>
> --
> *Pubudu Gunatilaka*
> Committer and PMC Member - Apache Stratos
> Software Engineer
> WSO2, Inc.: http://wso2.com
> mobile : +94774079049 <%2B94772207163>
>
>

Reply via email to