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.
- Host: GitHub
- URL: https://github.com/pires/apache-ignite-discovery-kubernetes
- Owner: pires
- License: apache-2.0
- Archived: true
- Created: 2016-06-24T12:12:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-09T10:53:10.000Z (almost 10 years ago)
- Last Synced: 2025-08-04T14:15:51.993Z (10 months ago)
- Topics: ignite, in-memory-database, kubernetes
- Language: Java
- Size: 11.7 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
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);
// ...
```