<p>We have a kubernetes cluster (version 1.18.x) running on ubuntu 18.04, and we mainly use this cluster to run AI jobs.</p>
<p>We want the cluster to schedule jobs based on bin packing policy (nvidia gpu resources have the highest weight), and I have done this as told by <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/resource-bin-packing/" rel="nofollow noreferrer">this article</a>. But after I do all the staff, the pod can't be scheduled anymore, it always stucks in Pending!!</p>
<p>Our command to run the scheduler is as below:</p>
<pre><code>/opt/kube/bin/kube-scheduler --address=127.0.0.1 --kubeconfig=/etc/kubernetes/kube-scheduler.kubeconfig --leader-elect=true --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 --tls-min-version=VersionTLS12 --v=2 --config=/path/to/my_policy_file.yaml 
</code></pre>
<p>Command to restart kube-scheduler:</p>
<pre><code>systemctl daemon-reload
systemctl stop kube-scheduler
systemctl start kube-scheduler
</code></pre>
<p>My Policy file:</p>
<pre><code>apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: KubeSchedulerConfiguration
leaderElection:
  leaderElect: true
clientConnection:
  kubeconfig: /etc/kubernetes/kube-scheduler.kubeconfig
profiles:
  - schedulerName: kube-scheduler
    plugins:
      score:
        enabled:
        - name: RequestedToCapacityRatio
          weight: 100
    pluginConfig:
    - name: RequestedToCapacityRatio
      args:
        shape:
        - utilization: 0
          score: 0
        - utilization: 100
          score: 10
        resources: 
        - name:  cpu
          weight: 1
        - name:  nvidia.com/gpu
          weight: 100
</code></pre>
<p>But after I apply this file to the default scheduler, it can't schedule pods anymore. Pod always stucks in pending. here is the yaml file I use to test:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test
spec:
  containers:
  - command: [&quot;/bin/bash&quot;, &quot;-c&quot;, &quot;sleep&quot;, &quot;3600&quot;]
    image: ubuntu:18.04
    name: test


              
                    
</code></pre>
<p>So how to correctlly turn on binpack feature? Why the job can't be scheduled?</p>

Wallace
<p>I solved this issue. I typed a wrong scheduler name. The name of default scheduler of kubernetes is default-scheduler, other than kube-scheduler.</p>
