OpenShift Tips

Routers

Scale routers

oc patch \
   --namespace=openshift-ingress-operator \
   --patch='{"spec": {"replicas": 1}}' \
   --type=merge \
   ingresscontroller/default

Moving routers to a specific (infra) node

Label the desired nodes with a particular label (infra) and add a taint to those nodes:

oc label node worker1  node-role.kubernetes.io/infra=
oc label node worker2  node-role.kubernetes.io/infra=
oc adm taint nodes -l node-role.kubernetes.io/infra infra=reserved:NoSchedule infra=reserved:NoExecute

Patch the ingresscontroller to use the nodes with specific nodeselector and a toleration for the previous taint:

oc patch ingresscontroller/default -n  openshift-ingress-operator  --type=merge -p '{"spec":{"nodePlacement": {"nodeSelector": {"matchLabels": {"node-role.kubernetes.io/infra": ""}},"tolerations": [{"effect":"NoSchedule","key": "infra","value": "reserved"},{"effect":"NoExecute","key": "infra","value": "reserved"}]}}}'
Last updated on 21 Aug 2023
Published on 18 Jun 2019
Edit on GitHub