Try Playground
Show / Hide Table of Contents

Create Discovery Service for NCache Clients in AKS

Inside an AKS cluster, every pod is assigned a dynamic IP address that is unknown to every other pod. To make sure that your client application creates a connection with NCache servers successfully, you need a service that exposes the NCache deployment pod's IP address for your application. So you need to create a headless discovery service that gives the client application access to the pods running the cache service inside the Azure Kubernetes cluster.

Create Discovery Service YAML File

Create a YAML file for headless discovery service. Let's call this file discoveryservice.yaml and this is what it should look like:

Note

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

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

Here, the clusterIP tag equals none, meaning that this service will not have any public IP assigned to it. This is what makes this service a headless service.

Create Discovery Service

  • Run the following command to create a discovery service that the AKS cluster uses to provide a communication channel between NCache servers and client applications.
kubectl create -f [dir]/discoveryservice.yaml 
  • After all required services have been deployed, you can check whether the created pods are live or not by running the following command in Azure Cloud Shell:
kubectl get pods -o wide
  • To get a list of all deployed services, run the following command:
kubectl get service  

After the successful creation of the cache discovery service, the next step is to create a Gateway Service in AKS, as explained in the next chapter.

See Also

Create NCache Deployment in AKS
Create Gateway Service in AKS
Create NCache Client Deployment in AKS
Create Cache Cluster in AKS

In This Article
  • Create Discovery Service YAML File
  • Create Discovery Service
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • 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 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top