Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IBM Platform Common Services dedicated node fix
#!/bin/sh
#
# Patch IBM Platform Common Services 3.2.3 with correct node selectors and tolerations
#
# This script can be run multiple times without adverse affects
#
kubectl patch deployment iam-policy-controller -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"master": "true"}}}}}'
kubectl patch statefulset prometheus-monitoring-prometheus -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"management": "true"},"tolerations":[{"effect":"NoSchedule","key":"dedicated","operator":"Exists"}]}}}}'
kubectl patch deployment monitoring-grafana -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"management": "true"},"tolerations":[{"effect":"NoSchedule","key":"dedicated","operator":"Exists"}]}}}}'
kubectl patch deployment monitoring-prometheus-collectdexporter -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"management": "true"},"tolerations":[{"effect":"NoSchedule","key":"dedicated","operator":"Exists"}]}}}}'
kubectl patch deployment monitoring-prometheus-kubestatemetrics -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"management": "true"},"tolerations":[{"effect":"NoSchedule","key":"dedicated","operator":"Exists"}]}}}}'
kubectl patch deployment monitoring-prometheus-operator -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"management": "true"},"tolerations":[{"effect":"NoSchedule","key":"dedicated","operator":"Exists"}]}}}}'
# License service is optional
kubectl get deployment ibm-licensing-licensing -n kube-system >/dev/null 2>&1 && kubectl patch deployment ibm-licensing-licensing -n kube-system --patch '{"spec":{"template":{"spec":{"nodeSelector":{"management": "true"},"tolerations":[{"effect":"NoSchedule","key":"dedicated","operator":"Exists"}]}}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.