简体   繁体   English

Apache Ignite C# kube.netes 客户端连接配置

[英]Apache Ignite C# Client Connection configuration for kubernetes

We are following the below article to establish C# client connection to the Ignite Cluster, both of them deployed in the Kube.netes.我们正在按照下面的文章建立到 Ignite 集群的 C# 客户端连接,它们都部署在 Kube.netes 中。

https://ignite.apache.org/docs/latest/installation/kube.netes/amazon-eks-deployment#creating-service https://ignite.apache.org/docs/latest/installation/kube.netes/amazon-eks-deployment#creating-service

We do not find the equivalent C# class/method to perform the connection configuration in the C# client application.我们没有找到等效的 C# 类/方法来在 C# 客户端应用程序中执行连接配置。

enter image description here在此处输入图像描述

Please help us to find alternate methods to do the connection configuration for Kube.netes.请帮助我们找到替代方法来为 Kube.netes 进行连接配置。

This API is not yet available for .NET, the relevant ticket is in progress and most likely will be included into the next release.此 API 尚不可用于 .NET,相关工单正在处理中,很可能会包含在下一个版本中。

For now, you can list a set of server IPs for your thin clients explicitly.现在,您可以明确列出瘦客户端的一组服务器 IP。 And for your server and thick client nodes it's fine to rely on spring.xml configuration.对于您的服务器和胖客户端节点,可以依赖 spring.xml 配置。 More details here .更多细节在这里

Example:例子:

 var cfg = new IgniteConfiguration
 {
    ...
    SpringConfigUrl = "/path/to/spring.xml"
  };

And your spring configuration:还有你的 spring 配置:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">

        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <!--
                        Enables Kubernetes IP finder and setting custom namespace and service names.
                    -->
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
                        <property name="namespace" value="ignite"/>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM