[
https://issues.apache.org/jira/browse/IGNITE-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833820#comment-15833820
]
Denis Magda commented on IGNITE-4160:
-------------------------------------
Kubernetes IP finder will be based on Kubernetes REST API [1] which allows to
get IP addresses of all the pods using a command like the one below:
{code}
curl
http://{api_server}/api/v1/namespaces/{namespace}/endpoints/{ignite_service_name}
{code}
Considering that we connect to the kubernetes master using the HTTP proxy [2]
with {{default}} as the namespace and the service name is {{ignite}}, then the
command will be the following:
{code}
curl http://localhost:8080/api/v1/namespaces/default/endpoints/ignite
{code}
The IP finder will provide a list of IP addresses with the empty port number by
parsing the endpoints only. The port number will be set to local node's
discovery port.
[1] https://kubernetes.io/docs/api-reference/v1/operations/
[2]
https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/
> Discovery SPI Implementation for Ignite Kubernetes Pods
> -------------------------------------------------------
>
> Key: IGNITE-4160
> URL: https://issues.apache.org/jira/browse/IGNITE-4160
> Project: Ignite
> Issue Type: Sub-task
> Reporter: Denis Magda
> Assignee: Denis Magda
> Fix For: 2.0
>
>
> There is no way to set a predefined internal IP address and port number for a
> Kubernetes pod. Kubernetes manages this on its own by assigning an IP address
> and port dynamically.
> In order to assemble an Ignite cluster under Kubernetes supervision we have
> to provide a Kubernetes specific implementation of discovery SPI. The
> discovery implementation has to use Kubernetes API to locate private IP
> addresses of all the Ignite pods (nodes) started so far and use these IP
> addresses at the join phase.
> Refer to an exemplary implementation of a discovery component in other
> distributed storage:
> https://github.com/pires/hazelcast-kubernetes#hazelcast-discovery-source
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)