## get the machineconfigpool
$ oc get machineconfigpool
## see details
$ oc describe machineconfigpool worker
## add label to the machineconfigpool if not exist
$ oc label machineconfigpool worker custom-kubelet=small-pods
#eg:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
creationTimestamp: 2019-02-08T14:52:39Z
generation: 1
labels:
custom-kubelet: small-pods
## Create a custom resource (CR) for your configuration change.
## Setting podsPerCore to 0 disables this limit.
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
name: set-max-pods
spec:
machineConfigPoolSelector:
matchLabels:
custom-kubelet: small-pods
kubeletConfig:
podsPerCore: 10
maxPods: 250
## check the machines and wait for update
$ oc get machineconfigpool
## eg:
NAME CONFIG UPDATED UPDATING DEGRADED
master master-9cc2c72f205e103bb534 False False False
worker worker-8cecd1236b33ee3f8a5e False True False
How to set number of pods per node in OpenShift ?
- gini
- · 1 min read
- Openshift, Kubernetes

Related Posts

OpenShift 3: Enforcing modern and strong OCP TLS & Cipher Suites
Introduction Enforcing strong and modern cipher is critical to ensure our deployment are well protected from old and weak cipher. Enforcing only …

OpenShift Cluster – How to Drain or Evacuate a Node for Maintenance
As we know OpenShift clusters are bundled with multiple compute nodes, master nodes, infra nodes etc, it’s not a big deal to manage node …

Start Your OpenShift Journey with these Free Red Hat Training Programs
Red Hat OpenShift Container Platform is one of the best kubernetes platform for enterprises. As we know kubernetes and OpenShift are multi-component …
OpenShift 4: Pushing my cluster to the limit
When I involved in the design of Red Hat OpenShift 4 platform for customer deployment, the common question coming from the customer was how much...

Kubernetes vs OpenShift – 15 Facts You Should Know
Kubernetes is an opensource project and OpenShift is an enterprise opensource product; more like an engine vs car.

How to Label a Namespace in Openshift or Kubernetes
Labeling an object in OpenShift or Kubernetes is an awesome method to organize, group, or select API objects. Labels can be used to group …
Muhammad Aizuddin Zali
Gineesh Madapparambath
Aneesh Mohan