Creating ResourceQuotas to limit resource usages of modules
ResourceQuotas
are Kubernetes resources that can be used to limit the number of infrastructure resources (such as CPU cores or memory) or Kubernetes resources (such as pods or deployments) that are available on a namespace basis.
From IBM Cloud Pak® for Multicloud Management Fix Pack 5, a set of ResourceQuotas
can be used in IBM Cloud Pak® for Multicloud Management to limit the resource usages of IBM Cloud Pak® for Multicloud Management modules.
The ResourceQuotas
settings are optional, which means that it depends on you whether to use them or not.
As other namespace-scoped Kubernetes resources, ResourceQuotas
can be created only in namespaces that already exist. The ibm-management-orchestrator
pod in the openshift-operators
namespace can create the namespaces
that are required for IBM Cloud Pak® for Multicloud Management modules that are enabled in the installation CR. However, you can create the relevant namespaces for IBM Cloud Pak® for Multicloud Management modules beforehand so that the
ResourceQuota
can be created before resources are provisioned in the related namespaces.
To limit the resource usages of IBM Cloud Pak® for Multicloud Management modules, follow either of the steps:
-
Create the namespaces for the modules that you need first, and then create the
ResourceQuotas
for the namespaces before you install the IBM Cloud Pak® for Multicloud Management. For how to create aResourceQuota
, see the creating a ResourceQuota section.Here are the mappings of IBM Cloud Pak® for Multicloud Management modules to the namespaces where they are installed:
- Infrastructure management:
management-infrastructure-management
. - Monitoring:
management-monitoring
. - Security services:
management-security-services
. - operations:
management-operations
. - Technology preview:
kube-system
. Thekube-system
namespace is always created with every installation of IBM Cloud Pak® for Multicloud Management.
- Infrastructure management:
-
Install the IBM Cloud Pak® for Multicloud Management first, and enable IBM Cloud Pak® for Multicloud Management modules that you need. Then, create the
ResourceQuota
for the namespaces of the modules. For how to create aResourceQuota
, see the creating a ResourceQuota section.For example, after you install IBM Cloud Pak® for Multicloud Management, and enable the
Infrastructure Management
module, themanagement-infrastructure-management
namespace is created automatically. Then, you can create theResourceQuota
for themanagement-infrastructure-management
namespace.
Creating a ResourceQuota
To create a ResourceQuota
, follow the steps:
-
Copy and paste the following code blocks into a file, and save it.
-
management-operations
apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources namespace: management-operations spec: hard: limits.cpu: "50" limits.memory: 128Gi requests.cpu: "50" requests.memory: 128Gi
-
management-monitoring
apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources namespace: management-monitoring spec: hard: limits.cpu: "50" limits.memory: 128Gi requests.cpu: "50" requests.memory: 128Gi
-
management-infrastructure-management
apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources namespace: management-infrastructure-management spec: hard: limits.cpu: "50" limits.memory: 128Gi requests.cpu: "50" requests.memory: 128Gi
-
management-security-services
apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources namespace: management-security-services spec: hard: limits.cpu: "50" limits.memory: 128Gi requests.cpu: "50" requests.memory: 128Gi
-
kube-system
apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources namespace: kube-system spec: hard: limits.cpu: "50" limits.memory: 128Gi requests.cpu: "50" requests.memory: 128Gi
-
-
Complete the creation of the
ResourceQuota
by running the following command:oc apply -f file-name-resourcequota-here.yaml