• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Create Discovery Service for Cache Clients in Amazon Elastic Kubernetes Service

In a standard environment, application connectivity is often managed via static IP addresses. However, within Amazon Elastic Kubernetes Service (EKS), pods are ephemeral and assigned dynamic IP addresses that change upon restart. To maintain stable communication, you must implement a Headless Discovery Service. This service acts as a communication bridge, allowing NCache client applications to discover the underlying pod IPs at runtime to initialize cache handles and perform distributed operations.

Create Discovery Amazon Elastic Kubernetes Service YAML File

The first step in creating a headless discovery service for your Amazon Elastic Kubernetes Service cluster is to create a YAML file. This file contains the required information a client application needs to connect to this service. Let's call this file cachediscovery.yaml and this is what it looks like:

Note

The parameters required to create this YAML file, ready to be deployed, are explained in the Properties table.

kind: Service
apiVersion: v1              # depends on underlying Kubernetes version
metadata:
  name: cacheserver
  labels:
    app: cacheserver
spec:
  clusterIP: None
  selector:
    app: ncache             # same label as provided in the ncache deployment yaml
  ports:
  - name: management-tcp
    port: 8250
    targetPort: 8250
  - name: management-http
    port: 8251
    targetPort: 8251
  - name: client-port
    port: 9800
    targetPort: 9800
Tip

The clusterIP tag is set to none here which shows that this service will not have any public IP assigned to it. This factor is what makes this service a headless service.

Create Discovery Service inside Cluster

After creating the YAML file, you need to deploy this resource inside your EKS cluster. Follow the steps mentioned below to set up this discovery service.

  • To create a fully functional discovery service that the Amazon Elastic Kubernetes Service cluster uses to communicate with NCache clients outside of the cache cluster, execute the following command in the AWS command line interface.

    kubectl create -f [dir]/cachediscovery.yaml
    
  • To get a list and status of all running services, execute the following command:

    kubectl get service
    

After creating a headless discovery service for NCache clients, you need to create Access for NCache Management, explained in the next chapter.

See Also

Create NCache Resources in EKS
Create Access for NCache Management in EKS
Create NCache Client in EKS
Create NCache Client Deployment in EKS

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top