How to Disable the ImageLocality Scheduling Plugin in PMK

Learn how to disable the imageLocality scheduling plugin in Platform9 Managed Kubernetes. Follow our step-by-step guide to update the kube-scheduler configuration and ensure optimal scheduling behavio

Problem

  • How to disable the imageLocality Scheduling plugin in PMK.

Environment

  • Platform9 Managed Kubernetes - All Versions

  • Platform9 Self Managed Cloud Platform - All Versions

  • Component: Kube-Scheduler

Procedure

circle-exclamation

Option A: Disable imageLocality plugin for default scheduling behaviour.

  • Update /etc/pf9/kube.d/configs/kube-scheduler.yamlon each master node as below.

apiVersion: kubescheduler.config.k8s.io/v1
kind: KubeSchedulerConfiguration
clientConnection:
  kubeconfig: /srv/kubernetes/kubeconfigs/kube-scheduler.yaml
profiles:
  - schedulerName: default-scheduler
    plugins:
      score:
        disabled:
          - name: ImageLocality
  • Perform a full-stack restart. (One Master Node at a time)

Option B: Disable imageLocality plugin using a new Scheduling profile.

  • Update /etc/pf9/kube.d/configs/kube-scheduler.yamlon each master node as below.

  • Perform a full-stack restart. (One Master Node at a time)

  • Now, Pods that want to be scheduled according to a specific profile (in this case no-imagelocality-scheduler ) can include the corresponding scheduler name in their .spec.schedulerName

Additional Information

Last updated