• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • Create Cache Cluster in AKS
Show / Hide Table of Contents
  • Deploying NCache in Azure Kubernetes Service
  • Create Azure Resource Group
  • Create Kubernetes Cluster in Azure
  • Deploy NCache Resources in AKS
    • Manually Deploy NCache in AKS
      • Create NCache Deployment in AKS
      • Create Discovery Service for NCache Clients in AKS
      • Create Gateway Service for NCache Management in AKS
    • Deploy NCache in AKS Through Operator
      • Create Service Account in AKS
      • Create Role Definition in AKS
      • Create Role Binding in AKS
      • Create NCache Operator in AKS
      • Create Custom Resource in AKS
  • Create NCache Client Deployment in AKS
  • Create Cache Cluster in AKS
  • Monitor NCache Cluster and Clients in AKS
  • Adding Cache Servers in AKS at Runtime
  • Removing Cache Severs in AKS at Runtime

Create NCache Cluster in AKS

After deploying all necessary services, now you need to create a cache cluster inside your AKS cluster. There are two ways to do this, one is through the NCache Management Center and the other is through the NCache PowerShell tool (ncacheps).

Note

You can use the NCache PowerShell tool only if your client application is deployed using .NET SDK. Refer to Create NCache Client Deployment in AKS to deploy the client with .NET SDK.

Using the NCache Management Center

Follow the steps mentioned below to create a cache cluster through the NCache Management Center.

  • Execute the following command to access the gateway IP address.

    kubectl get service
    
  • Copy the Public IP from the result of the previously executed command.

  • Paste that IP in a web browser of your choice followed by the NCache Management Center port number such as xx.xx.xx.xx:9801. This will lead you to the NCache Management Center at one of the cache nodes. From there you need to create a cache cluster.

ncweb-manager-gateway-access

Follow the steps provided in Create New Clustered Cache to create a new cache cluster using the NCache Management Center.

Important

Make sure the server IP addresses are the same as the ones shown in the result of the following command

kubectl get pods -o wide 

Using PowerShell

You can create a cluster and add nodes to it through the NCache PowerShell tool. Follow the steps provided below:

  • Run the NCache PowerShell tool.
  • Follow the steps mentioned in Create Cache Cluster to create a cache cluster and add nodes to it through NCache PowerShell.
Important
  • The server IP here should be the Public IP address available when the following command is executed:

    kubectl get service
    
  • The node IPs when adding server nodes to the cluster should be the same as the IPs mentioned when the following command is executed:

    kubectl get pods -o wide
    
Note

Start cache on all server nodes.

Connect Clients to Cache

After the cache cluster is created and the cache is started on all nodes, you need to connect clients to the cache. Follow either of the provided methods to do this.

Using GetCache() API

  • Connect to the cache using the GetCache() method of NCache.

  • Follow the steps mentioned in Connect to Cache to connect clients to your cache.

  • The following code snippet shows how the cache discovery service can be introduced when initializing the cache handle:

ICache cache = CacheManager.GetCache("democlusteredcache", new CacheConnectionOptions
{
    ServerList = new List<ServerInfo> { new ServerInfo("cacheserver")}, // other parameters
});

Using the Client Config File

  • Access client.ncconf file placed at %NCHOME%/config in Windows and at opt\ncache\config in Linux machines.
  • Add the name of the cache discovery service created earlier in Create Discovery Service in AKS in the <server name> tag under the name of your cache cluster as shown below:
< cache id="democlusteredcache" ...">
    <server name="cacheserver"/>
</cache>

Run NCache Client

Run your client application after setting up the cache cluster in AKS by executing the following command in Azure Cloud Shell:

kubectl exec --namespace=ncache client-podname -- /app/clientapplication/run.sh democlusteredcache cacheserver

Once the cache cluster is formed and clients are connected to it, you can monitor your cache cluster and clients, explained in the next chapter.

See Also

Create NCache Client Deployment in AKS
Monitor NCache Cluster and Clients in AKS
Adding Cache Servers in AKS at Runtime
Removing Cache Servers in AKS at Runtime

In This Article
  • Using the NCache Management Center
  • Using PowerShell
  • Connect Clients to Cache
    • Using GetCache() API
    • Using the Client Config File
  • Run NCache Client
  • 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