<p>Kubernetes version 1.17.4</p>

<p>Trying to toy around with custom scheduler priorities, I'm passing <code>--policy-config-file</code> pointing to file with following contents:</p>

<pre><code>  kind: Policy
  apiVersion: v1
  predicates:
    - name: CheckNodeUnschedulable
    - name: GeneralPredicates
    - name: PodFitsResources
    - name: PodToleratesNodeTaints
    - name: CheckVolumeBinding
    - name: MaxEBSVolumeCount
    - name: MatchInterPodAffinity
    - name: NoDiskConflict
    - name: NoVolumeZoneConflict
    - name: MatchNodeSelector
    - name: HostName
  priorities:
    - {name: BalancedResourceAllocation, weight: 1}
    - {name: LeastRequestedPriority, weight: 1}
    - {name: ServiceSpreadingPriority, weight: 1}
    - {name: NodePreferAvoidPodsPriority, weight: 1}
    - {name: NodeAffinityPriority, weight: 1}
    - {name: TaintTolerationPriority, weight: 1}
    - {name: ImageLocalityPriority, weight: 1}
    - {name: SelectorSpreadPriority, weight: 1}
    - {name: InterPodAffinityPriority, weight: 1}
</code></pre>

<p>which, i believe, is the default set of predicates and policies, however kubernetes scheduler fails to start with following error:</p>

<pre><code>F0417 12:35:52.291434       1 factory.go:265] error initializing the scheduling framework: plugin "NodeName" already registered as "FilterPlugin"
</code></pre>

<p>The <code>NodeName</code> is not mentioned anywhere in my config file. What am i doing wrong?</p>

<p>In this <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/#options" rel="nofollow noreferrer">link</a> you can see the parameter <code>--policy-config-file</code> is deprecated and the use is not recommended. </p>

<p><a href="https://github.com/kubernetes/kubernetes/blob/2db6ec1db7505b092c8e50eb8f10cd3a5f9950af/pkg/scheduler/framework/plugins/default_registry.go#L115" rel="nofollow noreferrer">Here</a>  you can see that  <code>GeneralPredicates</code>  and  <code>HostName</code>  use the same  <code>nodename</code>  plugin:</p>

<p><strong>NodeName Predicate:</strong></p>

<pre><code>registry.RegisterPredicate(predicates.GeneralPred,
...
  plugins.Filter = appendToPluginSet(plugins.Filter, nodename.Name, nil)
...
</code></pre>

<p><strong>Hostname predicate:</strong></p>

<pre><code>registry.RegisterPredicate(predicates.HostNamePred,
...
  plugins.Filter = appendToPluginSet(plugins.Filter, nodename.Name, nil)
...
</code></pre>

<p>So you could try to disable one of them and see if the error persist.</p>

<p>This should solve the issue for <code>nodename</code> plugin but if an other collision was detected you could try to solve in the same way.</p>
