I have now fixed this issue by doing the following modification:
Kubernetes Service ID = FixSpecialCharacters(Cluster ID) + Kubernetes
Service Seq No of the Cluster

Just FYI, Kubernetes Pod ID = FixSpecialCharacters(Member ID)
FixSpecialCharacters() method replaces "." and "_" characters with "-".

This modification is now available in master branch.

Thanks

On Sun, Feb 22, 2015 at 12:58 PM, Imesh Gunaratne <[email protected]> wrote:

> Hi Devs,
>
> I found the following error message raised by Kubernetes API when creating
> a service:
>
> org.apache.stratos.kubernetes.client.exceptions.KubernetesClientException:
> Could not create kubernetes service: [service-id]
> tomcat-1-tomcat-domainhttp-8080 [service-name]
> tomcat-1-tomcat-domainhttp-8080 [service-port] 4500 [container-port-name]
> http-1
>
> I did some research and found that Kubernetes is specially validating the
> service id as it is exposed as environment variables. It does not allow "."
> or "_" characters. We have already addressed this but seems like it also
> doesn't allow protocol name and port to be included.
>
> I have posted a mail [1] on this in Kubernetes google group and currently
> doing a local fix.
>
> [1] https://groups.google.com/forum/#!topic/google-containers/M4MCyb1KosE
>
> Thanks
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to