An open API service indexing awesome lists of open source software.

https://github.com/pires/apache-ignite-discovery-kubernetes

Apache Ignite discovery for Kubernetes.
https://github.com/pires/apache-ignite-discovery-kubernetes

ignite in-memory-database kubernetes

Last synced: 5 months ago
JSON representation

Apache Ignite discovery for Kubernetes.

Awesome Lists containing this project

README

          

:sectnums:
:numbered:
:toc: macro
:toc-title:
:toclevels: 99

# apache-ignite-discovery-kubernetes

Apache Ignite discovery for Kubernetes.

toc::[]

## Requirements

* Kubernetes cluster with DNS integration enabled

If you want to build the plug-in yourself, you'll need:

* Java compiler able to compile Java 7 code
* Maven 3.3.x or newer

## Usage

First, declare the following in your project's `pom.xml`:
```xml

com.github.pires
apache-ignite-discovery-kubernetes
1.0_1

```

Now, let's configure Apache Ignite discovery based on the following service descriptor:
```yaml
apiVersion: v1
kind: Service
metadata:
name: MY-SERVICE
labels:
component: my-svc
spec:
selector:
component: my-svc
clusterIP: None
ports:
- name: MY-CONTAINER-PORT
port: 47500
protocol: TCP
```

### XML

```xml














```

### Java

```java
// ...

// Headless service name that exposes Ignite cluster, embedded or not.
// See http://kubernetes.io/docs/user-guide/services/#headless-services
final String serviceName = "MY-SERVICE";
final String containerPortName = "MY-CONTAINER-PORT";

final KubernetesPodIpFinder podIpFinder = new KubernetesPodIpFinder();
podIpFinder.setContainerPortName(containerPortName);
podIpFinder.setServiceName(serviceName);

final TcpDiscoverySpi discovery = new TcpDiscoverySpi();
discovery.setIpFinder(podIpFinder);

final IgniteConfiguration igniteConfig = new IgniteConfiguration();
igniteConfig.setDiscoverySpi(discovery);

Ignition.start(igniteConfig);

// ...
```