Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ Do not use the management cluster for your workload. Workloads must not run on n
====

include::modules/hcp-labels-taints.adoc[leveloffset=+1]
include::modules/hcp-priority-classes.adoc[leveloffset=+1]
include::modules/hcp-priority-classes.adoc[leveloffset=+1]
include::modules/hcp-virt-taints-tolerations.adoc[leveloffset=+1]
34 changes: 34 additions & 0 deletions modules/hcp-virt-taints-tolerations.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-prepare/hcp-distribute-workloads.adoc

:_mod-docs-content-type: CONCEPT
[id="hcp-virt-taints-tolerations_{context}"]
= Custom taints and tolerations

For {hcp} on {VirtProductName}, by default, pods for a hosted cluster tolerate the `control-plane` and `cluster` taints. However, you can also use custom taints on nodes so that hosted clusters can tolerate those taints on a per-hosted-cluster basis by setting `HostedCluster.spec.tolerations`.

:FeatureName: Passing tolerations for a hosted cluster
include::snippets/technology-preview.adoc[]

.Example configuration
[source,yaml]
----
spec:
tolerations:
- effect: NoSchedule
key: kubernetes.io/custom
operator: Exists
----

You can also set tolerations on the hosted cluster while you create a cluster by using the `--tolerations` hcp CLI argument.

.Example CLI argument
[source,terminal]
----
--toleration="key=kubernetes.io/custom,operator=Exists,effect=NoSchedule"
----

For fine granular control of hosted cluster pod placement on a per-hosted-cluster basis, use custom tolerations with `nodeSelectors`. You can co-locate groups of hosted clusters and isolate them from other hosted clusters. You can also place hosted clusters in infra and control plane nodes.

Tolerations on the hosted cluster spread only to the pods of the control plane. To configure other pods that run on the management cluster and infrastructure-related pods, such as the pods to run virtual machines, you need to use a different process.