Skip to main content
Version: latest

Resource Management

Workspaces give you a unified view of resource consumption in specified namespaces across all clusters in the workspace. Additionally, you can implement resource quotas for the workspace as a whole, or for individual namespaces. The resource quotas are implemented using the native Kubernetes ResourceQuota object. Refer to the Kubernetes documentation to learn more about resource quotas.

Monitor Resource Consumption

Workspaces allow you to view the workloads such as pods, deployments, daemon sets, and stateful sets in the namespaces that comprise the workspace.

In the workspace details page, the landing Namespaces tab give you an overview of how much resources are consumed by each namespace. The CPU and Memory column display the total CPU and memory consumed by the namespaces with the same name in the entire workspace.

You can view more workloads by selecting the corresponding tab. For example, select the Pods tab if you want to monitor pod workloads. Each tab will show you the CPU and memory consumption of the corresponding workload in the entire workspace.

ResourceAvailable Information
NamespacesCPU and memory utilization of the namespace in each cluster.
PodsLists all the pods in a particular namespace with cluster names with detailed health status, age, and resource utilization.
DeploymentsAll deployments in the namespaces included in the workspace and their age, pods, and resource utilization.
DaemonSetsAll daemon set in the namespaces included in the workspace and their age, pods, and resource utilization.
StatefulSetsAll the active StatefulSets in the namespaces included in the workspace and their age, pods, replicas, and resource utilization.
JobsAll jobs in the namespaces included in the workspace and their status.
CronJobsAll cron jobs in the namespaces included in the workspace and their status.
RoleBindingAll role bindings in the namespaces included in the workspace, including the role name and the subject name.
ClusterRoleBindingAll cluster role bindings in the clusters included in the workspace.

Implement Resource Quotas

You can implement resource quotas on an entire workspace or implement them on individual namespaces. Resource quotas are implemented through Kubernetes' native ResourceQuota object. For more information about resource quotas in Kubernetes, refer to Kubernetes documentation.

Prerequisites

  • An active Palette workspace. Refer to Create a Workspace to learn how to create one.

  • You are logged in as a Palette user that has the permission to modify workspaces. For more information, refer to Permissions.

Procedure

  1. Log in to Palette.

  2. In the drop-down Menu at the top of the page, choose the project that has your workspace.

  3. On the left Main Menu, click Workspaces.

  4. Click on the workspace you want to update.

  5. Click Settings in the upper-right corner.

  6. Click Namespaces.

  7. Under Workspace Quota, you can specify the amount of CPU and memory that the entire workspace is allowed to consume. The default value is 0, which imposes no limit.

  8. If you want to limit resource use based on namespaces, enter the desired CPU and memory limit in the Allocate CPU and Allocate memory columns next to the namespace entry.

    By default, the namespace in each cluster has the same resource limit. You can change this and enter the limit on the namespace in one particular cluster. You must ensure that resources configured to individual namespaces do not exceed the workspace quota when added together.

    For example, if you have two clusters in the workspace and impose a workspace-level quota of 8 Gi of memory and 8 CPUs, when each instance of the namespace in each cluster is added together, the total memory and CPU quota cannot exceed 8 Gi of memory and 8 CPUs.

    The following resource quota configuration is not allowed for a workspace with 8 Gi of memory and 8 CPUs because the resource quotas add up to 11 Gi and 11 CPUs.

    Cluster 1Cluster 2
    Namespace 14 Gi, 4 CPUs4 Gi, 4 CPUs
    Namespace 22 Gi, 2 CPU1 Gi, 1 CPU

    The following resource quota configuration is allowed because the total quota is 8 Gi and 8 CPUs.

    Cluster 1Cluster 2
    Namespace 12 Gi, 2 CPUs2 Gi, 2 CPUs
    Namespace 23 Gi, 3 CPU1 Gi, 1 CPU

Validate

  1. Connect to a cluster in your workspace using kubectl. For more information, refer to Access Cluster with kubectl.

  2. Issue the following command to view the resource quotas created for your cluster. Confirm that the corresponding resource quotas have been created. You may also use the --namespace flag to choose a specific namespace to examine.

    kubectl get resourcequota --all-namespaces