Skip to content

Cluster trying to schedule all custom pods on master nodes before required cluster components are deployed #953

Discussion options

You must be logged in to vote

Just for documentation. We decided to add the following node affinity to our custom deployments/statefulsets:

spec:
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: node-role.kubernetes.io/master
                    operator: DoesNotExist

Now all custom Deployments/Statefulsets will never be deployed on nodes with label key "node-role.kubernetes.io/master". OKD/OpenShift stuff is still deployable on master nodes. It is not so restrictive as "oc patch schedulers.config.openshift.io/cluster --type merge -p '{"spec":{"mastersSchedulable":false}}'".

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@danielchristianschroeter
Comment options

@vrutkovs
Comment options

@danielchristianschroeter
Comment options

@vrutkovs
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by LorbusChris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants