## 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 ?
Gineesh Follow
·
1 min read
Share this
Written by Gineesh Follow
Author, Automation and Containerization Guy, techbeatly.com/youtubeLatest Stories
Featured
-
Integrating Ansible Automation Controller with Splunk
In Ansible, Automation, Featured, -
Mastering Tekton: Your Guide to Cloud-Native CI/CD Workflows
In Automation, Courses, DevOps, -
Learn Ansible – A Comprehensive Guide for Courses and Exams
In Ansible, Ansible Resources, Automation, -
Free GitOps and CI/CD Courses and Certifications
In ArgoCD, DevOps, Featured, -
Terraform Cheat Sheet
In DevOps, Featured, Infrastructre & Hardware, -
Kubernetes vs OpenShift – 15 Facts You Should Know
In Cloud, DevOps, Featured, -
Introduction to OpenShift BootCamp
In DevOps, Featured, Kubernetes, -
How to set up and use Python virtual environments for Ansible
In Ansible, Automation, DevOps, -
5 Mistakes You Should Avoid During Kubernetes Exam
In Cloud, DevOps, Featured, -
10 Tips for your Kubernetes Exam – CKA & CKAD
In DevOps, Featured, Kubernetes, -
CKA, CKS & CKAD Learning Path and Certification
In Featured, Infrastructre & Hardware, Kubernetes,