This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.10.5. 네임스페이스별 Pod 필터링
네임스페이스에 따라 Pod가 제거로 간주되는지 여부를 구성할 수 있습니다. 다음 Descheduler 전략만 네임스페이스 필터링을 지원합니다.
-
PodLifeTime
-
RemovePodsHavingTooManyRestarts
-
RemovePodsViolatingInterPodAntiAffinity
-
RemovePodsViolatingNodeAffinity
-
RemovePodsViolatingNodeTaints
IncludeNamespaces
매개변수를 사용하여 Descheduler 전략을 실행해야 하는 네임스페이스를 지정하거나 ExcludeNamespaces
매개변수를 사용하여 Descheduler 전략을 실행할 네임스페이스를 지정할 수 있습니다.
사전 요구 사항
- 클러스터 관리자 권한이 있어야 합니다.
프로세스
KubeDescheduler
오브젝트를 편집합니다.$ oc edit kubedeschedulers.operator.openshift.io cluster -n openshift-kube-descheduler-operator
하나 이상의 전략에
IncludeNamespaces
또는ExcludeNamespaces
매개변수를 추가합니다.apiVersion: operator.openshift.io/v1beta1 kind: KubeDescheduler metadata: ... spec: deschedulingIntervalSeconds: 3600 strategies: - name: "RemovePodsHavingTooManyRestarts" params: - name: "PodRestartThreshold" value: "10" - name: "IncludingInitContainers" value: "false" - name: "IncludeNamespaces" 1 value: "my-project" 2 - name: "PodLifeTime" params: - name: "MaxPodLifeTimeSeconds" value: "86400" - name: "ExcludeNamespaces" 3 value: "my-other-project" 4
- 파일을 저장하여 변경 사항을 적용합니다.