Try Playground
Show / Hide Table of Contents

Create Custom Resource in Kubernetes

The Operator needs a resource file that declares the customary resources of the cluster that you created in Kubernetes. The Operator uses this custom resource file to declare the Kubernetes cluster with your desired state. To make sure the Operator gets access to custom resources, you need to create a manifest file and deploy it in the cluster. Follow the steps provided below:

Create Manifest File for Custom Resources

ncache_custom_resource.yaml file lists the desired state of your kubernetes cluster under the spec section.

Note

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

kind: NCache
apiVersion: alachisoft.ncache/v1
metadata:
  name: ncache
spec:
  # Add fields here
  clusterSize: 1
  image: enterprise-server-5.2-linux   # NCache container image
  nodeSelector:
    kubernetes.io/os: linux
  podRequests:
    memory: "512Mi" 
    cpu: 1
  podLimits:
    memory: "512Mi"
    cpu: 1
  debug:
    enable: false
  parameters:
    '{"registrationInfo": {"email": "john_smith@yourcompany.com","firstName": "John","lastName": "Smith","company": "Your Company","environment": "Production","clientLicenses": "8", "licenseKey": "xxxxxxx-xxxxxxx-xxxxxxx"}}'
Note

You can provide Evaluation Key instead of License Key in the parameters section to activate NCache in evaluation mode. "evaluationKey": "xxxxxxxxxxxxxxxxxxxxxxxxxx"

Deploy Custom Resources in Kubernetes

To deploy the desired state specified in the ncache_custom_resource.yaml, you need to execute the following command in the cloud shell:

kubectl create -f [dir]/ncache_custom_resource.yaml

On execution of this command, the Operator will activate your NCache cluster using the registration information provided in the custom resource file.

For verification, run the following command:

kubectl get pods -w 

Properties

The properties required to create and deploy a custom resource in your Kubernetes cluster are explained below:

Parameter Description
-kind Specifies the kind of custom resource to deploy. In this case, it is NCache.
-apiVersion Specifies the version of the custom resource that is to be deployed in kubernetes.
-name Specifies the name of the deployment.
-clusterSize Specifies the number of servers of the NCache cluster.
-image Specifies the path of the container image of NCache.
-nodeSelector Specifies the node on which the underlying container needs to be hosted.
-podRequests Specifies the limits on requests required at the time of scheduling.
-podLimits Specifies the limits on pods. If this is not provided, the pod will use the maximum memory and CPU limit.
-parameters Specifies the registration information to install NCache in the container.

The next step is to deploy the NCache client in your Kubernetes cluster, the steps of which have been explained in the next chapter.

See Also

Create Role Definition in Kubernetes
Create Service Account in Kubernetes
Create Custom Resource in Kubernetes

In This Article
  • Create Manifest File for Custom Resources
  • Deploy Custom Resources in Kubernetes
  • Properties
  • 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