Skip to content

Instantly share code, notes, and snippets.

@luszczynski
Last active September 13, 2023 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luszczynski/eda84869731c439b0d8d277279d3d104 to your computer and use it in GitHub Desktop.
Save luszczynski/eda84869731c439b0d8d277279d3d104 to your computer and use it in GitHub Desktop.
OCP vCPUs for worker nodes

OCP 4

oc get nodes -o=custom-columns=NAME:.metadata.name,CPU:.status.capacity.cpu --selector='node-role.kubernetes.io/worker,!node-role.kubernetes.io/infra' | sed 1d
oc get nodes -o=custom-columns=NAME:.metadata.name,CPU:.status.capacity.cpu --selector='node-role.kubernetes.io/compute,!node-role.kubernetes.io/infra'
oc get nodes -o=custom-columns=NAME:.metadata.name,CPU:.status.capacity.cpu --selector='node-role.kubernetes.io/compute,!node-role.kubernetes.io/infra' | awk '{n += $2}; END{print n}'

OCP 3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment