Skip to content

Commit b8d483f

Browse files
wkingjhixson74
authored andcommitted
docs/user/*/install_upi: Explicitly set control-plane unschedulable
We grew replicas-zeroing in c22d042 (docs/user/aws/install_upi: Add 'sed' call to zero compute replicas, 2019-05-02, openshift#1649) to set the stage for changing the 'replicas: 0' semantics from "we'll make you some dummy MachineSets" to "we won't make you MachineSets". But that hasn't happened yet, and since 64f96df (scheduler: Use schedulable masters if no compute hosts defined, 2019-07-16, openshift#2004) 'replicas: 0' for compute has also meant "add the 'worker' role to control-plane nodes". That leads to racy problems when ingress comes through a load balancer, because Kubernetes load balancers exclude control-plane nodes from their target set [1,2] (although this may get relaxed soonish [3]). If the router pods get scheduled on the control plane machines due to the 'worker' role, they are not reachable from the load balancer and ingress routing breaks [4]. Seth says: > pod nodeSelectors are not like taints/tolerations. They only have > effect at scheduling time. They are not continually enforced. which means that attempting to address this issue as a day-2 operation would mean removing the 'worker' role from the control-plane nodes and then manually evicting the router pods to force rescheduling. So until we get the changes from [3], we can either drop the zeroing [5] or adjust the scheduler configuration to remove the effect of the zeroing. In both cases, this is a change we'll want to revert later once we bump Kubernetes to pick up a fix for the service load-balancer targets. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1671136#c1 [2]: kubernetes/kubernetes#65618 [3]: https://bugzilla.redhat.com/show_bug.cgi?id=1744370#c6 [4]: https://bugzilla.redhat.com/show_bug.cgi?id=1755073 [5]: openshift#2402
1 parent dcabe38 commit b8d483f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

docs/user/aws/install_upi.md

+16
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ $ rm -f openshift/99_openshift-cluster-api_master-machines-*.yaml openshift/99_o
5050

5151
You are free to leave the compute MachineSets in if you want to create compute machines via the machine API, but if you do you may need to update the various references (`subnet`, etc.) to match your environment.
5252

53+
### Make control-plane nodes unschedulable
54+
55+
Currently [emptying the compute pools](#empty-compute-pools) makes control-plane nodes schedulable.
56+
But due to a [Kubernetes limitation][kubernetes-service-load-balancers-exclude-masters], router pods running on control-plane nodes will not be reachable by the ingress load balancer.
57+
Update the scheduler configuration to keep router pods and other workloads off the control-plane nodes:
58+
59+
```sh
60+
python -c '
61+
import yaml;
62+
path = "manifests/cluster-scheduler-02-config.yml"
63+
data = yaml.load(open(path));
64+
data["spec"]["mastersSchedulable"] = False;
65+
open(path, "w").write(yaml.dump(data, default_flow_style=False))'
66+
```
67+
5368
### Remove DNS Zones
5469

5570
If you don't want [the ingress operator][ingress-operator] to create DNS records on your behalf, remove the `privateZone` and `publicZone` sections from the DNS configuration:
@@ -341,6 +356,7 @@ prometheus-k8s-openshift-monitoring.apps.your.cluster.domain.example.com
341356
[cloudformation]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html
342357
[delete-stack]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-delete-stack.html
343358
[ingress-operator]: https://github.com/openshift/cluster-ingress-operator
359+
[kubernetes-service-load-balancers-exclude-masters]: https://github.com/kubernetes/kubernetes/issues/65618
344360
[machine-api-operator]: https://github.com/openshift/machine-api-operator
345361
[route53-alias]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html
346362
[route53-zones-for-load-balancers]: https://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region

docs/user/gcp/install_upi.md

+16
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ If you do not want the cluster to provision compute machines, remove the compute
7878
rm -f openshift/99_openshift-cluster-api_worker-machineset-*.yaml
7979
```
8080

81+
### Make control-plane nodes unschedulable
82+
83+
Currently [emptying the compute pools](#empty-compute-pools) makes control-plane nodes schedulable.
84+
But due to a [Kubernetes limitation][kubernetes-service-load-balancers-exclude-masters], router pods running on control-plane nodes will not be reachable by the ingress load balancer.
85+
Update the scheduler configuration to keep router pods and other workloads off the control-plane nodes:
86+
87+
```sh
88+
python -c '
89+
import yaml;
90+
path = "manifests/cluster-scheduler-02-config.yml"
91+
data = yaml.load(open(path));
92+
data["spec"]["mastersSchedulable"] = False;
93+
open(path, "w").write(yaml.dump(data, default_flow_style=False))'
94+
```
95+
8196
### Remove DNS Zones (Optional)
8297

8398
If you don't want [the ingress operator][ingress-operator] to create DNS records on your behalf, remove the `privateZone` and `publicZone` sections from the DNS configuration.
@@ -682,4 +697,5 @@ openshift-service-catalog-controller-manager-operator openshift-service-catalo
682697

683698
[deploymentmanager]: https://cloud.google.com/deployment-manager/docs
684699
[ingress-operator]: https://github.com/openshift/cluster-ingress-operator
700+
[kubernetes-service-load-balancers-exclude-masters]: https://github.com/kubernetes/kubernetes/issues/65618
685701
[machine-api-operator]: https://github.com/openshift/machine-api-operator

0 commit comments

Comments
 (0)