Fix whitespace in pod topology spread constraints page

This commit is contained in:
Aldo Culquicondor 2021-10-28 08:46:17 -04:00 committed by GitHub
parent 891953ec20
commit 1061e7ff22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 29 deletions

View File

@ -236,41 +236,41 @@ The scheduler will skip the non-matching nodes from the skew calculations if the
Suppose you have a 5-node cluster ranging from zoneA to zoneC: Suppose you have a 5-node cluster ranging from zoneA to zoneC:
{{<mermaid>}} {{<mermaid>}}
graph BT graph BT
subgraph "zoneB" subgraph "zoneB"
p3(Pod) --> n3(Node3) p3(Pod) --> n3(Node3)
n4(Node4) n4(Node4)
end end
subgraph "zoneA" subgraph "zoneA"
p1(Pod) --> n1(Node1) p1(Pod) --> n1(Node1)
p2(Pod) --> n2(Node2) p2(Pod) --> n2(Node2)
end end
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000; classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff; classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5; classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
class n1,n2,n3,n4,p1,p2,p3 k8s; class n1,n2,n3,n4,p1,p2,p3 k8s;
class p4 plain; class p4 plain;
class zoneA,zoneB cluster; class zoneA,zoneB cluster;
{{< /mermaid >}} {{< /mermaid >}}
{{<mermaid>}} {{<mermaid>}}
graph BT graph BT
subgraph "zoneC" subgraph "zoneC"
n5(Node5) n5(Node5)
end end
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000; classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff; classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5; classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
class n5 k8s; class n5 k8s;
class zoneC cluster; class zoneC cluster;
{{< /mermaid >}} {{< /mermaid >}}
and you know that "zoneC" must be excluded. In this case, you can compose the yaml as below, so that "mypod" will be placed onto "zoneB" instead of "zoneC". Similarly `spec.nodeSelector` is also respected. and you know that "zoneC" must be excluded. In this case, you can compose the yaml as below, so that "mypod" will be placed onto "zoneB" instead of "zoneC". Similarly `spec.nodeSelector` is also respected.
{{< codenew file="pods/topology-spread-constraints/one-constraint-with-nodeaffinity.yaml" >}} {{< codenew file="pods/topology-spread-constraints/one-constraint-with-nodeaffinity.yaml" >}}
The scheduler doesn't have prior knowledge of all the zones or other topology domains that a cluster has. They are determined from the existing nodes in the cluster. This could lead to a problem in autoscaled clusters, when a node pool (or node group) is scaled to zero nodes and the user is expecting them to scale up, because, in this case, those topology domains won't be considered until there is at least one node in them. The scheduler doesn't have prior knowledge of all the zones or other topology domains that a cluster has. They are determined from the existing nodes in the cluster. This could lead to a problem in autoscaled clusters, when a node pool (or node group) is scaled to zero nodes and the user is expecting them to scale up, because, in this case, those topology domains won't be considered until there is at least one node in them.