Skip to content

Instantly share code, notes, and snippets.

@brianpursley
Last active April 13, 2023 01:11
Show Gist options
  • Save brianpursley/58aee0d33d70ca75009f3a9ab3a47bc8 to your computer and use it in GitHub Desktop.
Save brianpursley/58aee0d33d70ca75009f3a9ab3a47bc8 to your computer and use it in GitHub Desktop.
Remove extended resources from kubernetes nodes
kubectl patch node k8s-worker-1 --subresource=status --type=json -p='[{"op":"remove","path":"/status/capacity/example.com~1fakecpu"}]'
kubectl patch node k8s-worker-1 --subresource=status --type=json -p='[{"op":"remove","path":"/status/capacity/example.com~1fakePTSRes"}]'
kubectl patch node k8s-worker-1 --subresource=status --type=json -p='[{"op":"remove","path":"/status/capacity/scheduling.k8s.io~1foo"}]'
kubectl patch node k8s-worker-2 --subresource=status --type=json -p='[{"op":"remove","path":"/status/capacity/example.com~1fakecpu"}]'
kubectl patch node k8s-worker-2 --subresource=status --type=json -p='[{"op":"remove","path":"/status/capacity/example.com~1fakePTSRes"}]'
kubectl patch node k8s-worker-2 --subresource=status --type=json -p='[{"op":"remove","path":"/status/capacity/scheduling.k8s.io~1foo"}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment