Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Kf-Apps können auf dedizierten Knoten im Cluster bereitgestellt werden.
Diese Funktion ist erforderlich, wenn Sie mehr Kontrolle über einen Knoten haben möchten, in dem ein App-Pod landet. Beispiel:
Wenn Sie denselben Cluster für verschiedene Anwendungen freigeben, aber dedizierte Knoten für eine bestimmte Anwendung möchten.
Wenn Sie dedizierte Knoten für eine bestimmte Organisation (Kf Space) möchten.
Wenn Sie ein bestimmtes Betriebssystem wie Windows ansprechen möchten.
Wenn Sie Pods von zwei verschiedenen Diensten, die häufig kommunizieren, bereitstellen möchten.
Für die Rechenisolation verwendet Kf den nodeSelector. Wenn Sie diese Funktion verwenden möchten, fügen Sie zuerst Labels auf den Knoten oder Knotenpools hinzu, auf denen Ihre App-Pods landen sollen, und fügen dann dieselben qualifizierenden Labels auf dem Kf Space hinzu.
Alle Apps in diesem Space werden dann an die Knoten mit übereinstimmenden Labels gesendet.
nodeSelector in einem Kf-Cluster konfigurieren
Die Compute-Isolierung ist standardmäßig deaktiviert. Gehen Sie so vor, um Labels und nodeSelector zu konfigurieren.
Fügen Sie dem Knoten, auf dem Ihre Anwendungs-Pods landen sollen, ein Label (distype=ssd) hinzu.
kubectllabelnodesnodeiddisktype=ssd
Fügen Sie im Kf Space dasselbe Label hinzu. Alle in diesem Space bereitgestellten Apps leiten dann die entsprechenden Knoten weiter.
Die Bereitstellung von Kf-Apps kann noch weiter ausgerichtet werden, je nachdem, welcher Stack (Buildpack) zum Erstellen und Verpacken der Anwendung verwendet wird. Beispiel: Wenn Sie möchten, dass Ihre Anwendungen mit spaceStacksV2 auf Knoten mit Linux-Kernel 4.4.1 erstellt werden, überschreiben nodeSelector-Werte die Werte auf einem Stack, die im Space konfiguriert wurden.
So konfigurieren Sie nodeSelector in einem Stack:
Bearbeiten Sie die config-defaults Ihres Kf-Clusters und fügen Sie die Labels hinzu.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Enable compute isolation\n\nKf Apps can be deployed on dedicated nodes in the cluster.\nThis feature is required if you have the circumstances where you might want more\ncontrol on a node where an App Pod lands. For example:\n\n- If you are sharing the same cluster for different Apps but want dedicated nodes for a particular App.\n- If you want dedicated nodes for a given organization (Kf Space).\n- If you want to target a specific operating system like Windows.\n- If you want to co-locate Pods from two different services that frequently communicate.\n\nTo enable compute isolation, Kf uses the Kubernetes [nodeSelector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node). To\nuse this feature, first add labels on the nodes or node pools where you want\nyour App Pods to land and then add the same qualifying labels on the Kf Space.\nAll the Apps installed in this Space then land on the nodes with matching labels.\n\nConfigure nodeSelector in a Kf cluster\n--------------------------------------\n\nBy default, compute isolation is disabled. Use the following procedure\nto configure labels and nodeSelector.\n\n1. Add a label (`distype=ssd`) on the node where you want your application pods to\n land.\n\n kubectl label nodes \u003cvar translate=\"no\"\u003enodeid\u003c/var\u003e disktype=ssd\n\n2. Add the same label on the Kf Space. All Apps deployed in this Space\n will then land on the qualifying nodes.\n\n kf configure-space set-nodeselector \u003cvar translate=\"no\"\u003espace-name\u003c/var\u003e disktype ssd\n\n You can add multiple labels by running the same command again.\n3. Check the label is configured.\n\n kf configure-space get-nodeselector \u003cvar translate=\"no\"\u003espace-name\u003c/var\u003e\n\n4. Delete the label from the space.\n\n kf configure-space unset-nodeselector \u003cvar translate=\"no\"\u003espace-name\u003c/var\u003e disktype\n\nOverride nodeSelector for [Kf stacks](/migrate/kf/docs/2.7/cli/kf-stacks)\n-------------------------------------------------------------------------\n\nDeployment of Kf Apps can be further targeted based\non what stack (buildpack) is being used to build and package the App. For\nexample, if you want your applications built with `spaceStacksV2` to land on\nnodes with Linux kernel 4.4.1., `nodeSelector` values on a stack override the\nvalues configured on the Space.\n\nTo configure the `nodeSelector` on a stack:\n\n1. Edit the `config-defaults` of your Kf cluster and add the labels.\n\n $ kubectl -n kf edit configmaps config-defaults\n\n2. Add `nodeSelector` to the stacks definition.\n\n .....\n .....\n spaceStacksV2: |\n - name: cflinuxfs3\n image: cloudfoundry/cflinuxfs3\n nodeSelector:\n OS_KERNEL: LINUX_4.4.1 \n .....\n ....."]]