Kf 앱은 클러스터의 전용 노드에 배포할 수 있습니다.
앱 포드가 도착하는 노드를 보다 효과적으로 관리해야 할 때 이 기능이 필요합니다. 예를 들면 다음과 같습니다.
여러 앱에서 동일한 클러스터를 공유하지만 특정 앱의 전용 노드가 필요한 경우
특정 조직의 전용 노드가 필요한 경우(Kf 공간)
Windows와 같은 특정 운영체제를 타겟팅하는 경우
자주 통신하는 두 서비스의 포드를 같은 위치에 배치하는 경우
컴퓨팅 격리를 사용 설정할 때 Kf에서는 Kubernetes nodeSelector를 사용합니다. 이 기능을 사용하려면 먼저 앱 포드가 도착할 노드 또는 노드 풀에 라벨을 추가한 후 Kf 공간에 동일한 적격 라벨을 추가합니다.
이 공간에 설치된 모든 앱이 라벨이 일치하는 노드에 도착합니다.
Kf는 각 Kf 빌드를 실행하기 위한 Kubernetes 포드를 만듭니다. buildNodeSelector 기능을 사용하여 빌드 포드만 실행하도록 컴퓨팅 리소스를 격리시킬 수 있습니다. 한 가지 사용 사례는 앱 포드를 다른 노드에서 실행하고 SSD가 있는 노드에서 빌드 포드가 실행되도록 격리하는 것입니다. BuildNodeSelectors 기능은 컴퓨팅 리소스 최적화 및 클러스터 유연성을 제공합니다. 이 페이지에서 'BuildNodeSelectors 및 빌드 노드 풀 구성' 장을 참조하세요.
Kf 클러스터에서 nodeSelector 구성
기본적으로 컴퓨팅 격리는 사용 중지되어 있습니다. 다음 절차에 따라 라벨 및 nodeSelector를 구성합니다.
애플리케이션 pod가 도착할 노드에 라벨(distype=ssd)을 추가합니다.
kubectllabelnodesnodeiddisktype=ssd
Kf 공간에 동일한 라벨을 추가합니다. 그러면 이 공간에 배포된 모든 앱이 적격한 노드에 도착합니다.
Kf 앱 배포는 앱을 빌드하고 패키징하는 데 사용되는 스택(빌드팩)을 기반으로 추가로 타겟팅할 수 있습니다. 예를 들어 spaceStacksV2로 빌드된 애플리케이션을 Linux 커널 4.4.1이 있는 노드에 배치하려는 경우 스택의 nodeSelector 값이 공간에서 구성된 값을 재정의합니다.
빌드 노드 선택기는 빌드 풀의 노드 선택기를 대체할 때만 효과가 있고 앱 포드에 영향을 주지 않습니다. 예를 들어 공간의 노드 선택기와 Kfsystem의 빌드 노드 선택기를 모두 지정하면 앱 포드에 공간 노드 선택기가 포함되고 빌드 포드에는 Kfsystemㅇ의 빌드 노드 선택기가 포함됩니다. 노드 선택기가 공간에만 지정되었으면 앱 및 빌드 포드 모두 공간의 노드 선택기가 포함됩니다.
빌드 포드를 할당하려는 노드에 라벨(예를 들어 disktype:ssd)을 추가합니다.
kubectllabelnodesnodeiddisktype=ssd
KfSystem CR에 패치를 적용하여 빌드 노드 선택기를 추가/업데이트합니다(key:value 쌍 형식).
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 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\nKf creates a Kubernetes pod to execute each Kf Build, the buildNodeSelector feature can be used to isolate compute resources to execute only the Build pods. One use case is to isolate Build pods to run on nodes with SSD, while running the App pods on other nodes. The BuildNodeSelectors feature provides compute resource optimization and flexibility in the cluster. Please refer to chapter 'Configure BuildNodeSelectors and a build node pool' on this page.\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.8/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 .....\n\nConfigure BuildNodeSelectors and a Build node pool\n--------------------------------------------------\n\nBuild node selectors are only effective at overriding the node selectors for the Build pods, they do not affect App pods. For example, if you specify both the node selectors on the Space and the Build node selectors in Kfsystem, App pods will have the Space node selectors while the Build pods will have the Build node selectors from Kfsystem; if node selectors are only specified in the Space, both the App and Build pods will have the node selector from the Space.\n\n1. Add labels (`disktype:ssd` for example) on the nodes that you want your Build pods to be assigned to.\n\n kubectl label nodes \u003cvar translate=\"no\"\u003enodeid\u003c/var\u003e disktype=ssd\n\n2. Add/update Build node selectors (in the format of `key:value` pairs) by patching KfSystem CR.\n\n kubectl patch kfsystem kfsystem --type='json' -p='[{'op': 'replace', 'path': '/spec/kf/config/buildNodeSelectors', 'value': {\u003ckey\u003e:\u003cvalue\u003e}}]'\n\n For example, to add `disktype=ssd` as the Build node selector: \n\n kubectl patch kfsystem kfsystem --type='json' -p='[{'op': 'replace', 'path': '/spec/kf/config/buildNodeSelectors', 'value': {\"disktype\":\"ssd\"}}]'"]]