Clusters
🕓 8 minutes
Core Concepts
What you'll learn
- What CodeNOW Clusters are and how they work
- How to interpret resource allocation metrics in the dashboard
- Best practices for managing resources in your clusters
- How to access clusters directly using kubectl
Prerequisites
- Basic understanding of Kubernetes
- CodeNOW account with appropriate permissions
What are CodeNOW Clusters?
CodeNOW Clusters are managed Kubernetes environments where your applications and services run. They provide the infrastructure foundation for all your deployments, with CodeNOW handling the underlying complexity of Kubernetes while giving you the flexibility to deploy and manage your workloads efficiently.
Each cluster is built on standard Kubernetes technology, allowing you to leverage both:
- The simplicity of the CodeNOW UI
- The power of native Kubernetes tools when needed
Understanding the Resource Dashboard
When viewing a cluster in CodeNOW, you'll see a resource allocation dashboard that displays metrics like CPU and memory usage in the format X / Y GB or X / Y CPU cores.
Important: What These Numbers Mean
Note: The resource metrics shown in the dashboard (e.g.,
3/8 GB) represent the maximum potential resource allocation, not actual usage.
The dashboard metrics represent:
- ✅ The sum of defined resource requests/limits for all deployed workloads
- ✅ The maximum potential resource allocation within the cluster based on configurations
- ❌ Not the actual, real-time resource consumption
These figures show how much of your total cluster capacity has been allocated to workloads through their resource definitions, regardless of whether they're actively using those resources.
Viewing Actual Resource Usage
/>
To see the real-time resource consumption of your running applications:
- Navigate to the Clusters section in the left sidebar
- Select your cluster of interest
- Click on the Monitoring tab
- View the real-time resource usage graphs for CPU, memory, and other metrics
Kubernetes Foundation and CodeNOW Tooling
CodeNOW Clusters are standard Kubernetes clusters with additional management layers that simplify operations. While the CodeNOW UI provides an intuitive interface for most tasks, advanced users can also interact directly with the clusters using standard Kubernetes tools like kubectl.
For information on accessing your clusters directly with kubectl, see Accessing Clusters through Kubeconfig.
Using the CodeNOW UI is recommended for most operations, but direct kubectl access gives you additional flexibility for advanced scenarios.
Resource Definitions: Requests and Limits
Why Resource Definitions Are Mandatory
In CodeNOW, setting resource requests and limits for every workload deployed to a cluster is mandatory. This requirement exists for several critical reasons:
| Reason | Description |
|---|---|
| Stability | Without limits, a single workload could consume unbounded resources, potentially destabilizing the entire node or cluster |
| Predictability | Defined resource requests ensure workloads get the resources they need to function properly |
| Protection | Resource limits prevent "noisy neighbor" problems where one application impacts the performance of others |
| Cost management | Clear resource allocation helps optimize cluster sizing and cost |
Risks of Undefined Resources
Failing to set appropriate resource limits can lead to serious operational issues!
Potential problems include:
- ⚠️ Workloads being terminated with
OOMKilled(Out of Memory) errors - ⚠️ Unpredictable application performance
- ⚠️ Cascading failures as resource contention affects multiple services
- ⚠️ Difficulty in capacity planning and scaling
Best Practices
Follow these guidelines for optimal resource management:
- Set realistic resource requests based on actual application needs
- Configure resource limits that allow for normal operation plus reasonable headroom
- Monitor actual usage over time to refine your resource definitions
- Consider using horizontal scaling rather than oversizing individual pods
For more information on configuring resources for your components, see:
Managing Multiple Clusters
CodeNOW supports multiple clusters under a single account, allowing you to:
- 🔄 Separate production and non-production workloads
- 🔄 Allocate dedicated hardware resources to specific environments
- 🔄 Implement geographic distribution for high availability
To add a new cluster to your account, contact the CodeNOW support team with a support request.