Disable the descheduler

When you disable the descheduler, its deployment, ConfigMap, and cluster-scoped RBAC resources are deleted from the cluster.

Note

If you intend to re-enable the policy at a later date, back up policy.yaml before you disable the descheduler.

  1. Download the MKE configuration file:

    curl --silent --insecure -H "Authorization: Bearer $AUTHTOKEN" \
      "https://${MKE_HOST}/api/ucp/config-toml" > mke-config.toml
    
  2. Navigate to the cluster_config.descheduler parameter:

    [cluster_config.descheduler]
      enabled = true
      replicas = 2
      extra_flags = []
    

    For detailed information on the cluster_config.descheduler configuration parameter, refer to the configuration options detail.

  3. Set enabled to false.

  4. Upload the updated MKE configuration file:

    curl --silent --insecure -X PUT -H "accept: application/toml" \
      -H "Authorization: Bearer $AUTHTOKEN" \
      --upload-file mke-config.toml \
      "https://${MKE_HOST}/api/ucp/config-toml"
    
  5. Wait for cluster reconciliation and then run the following commands:

    kubectl get deployment,configmap,sa -n kube-system \
      2>/dev/null | grep -E 'ucp-descheduler|NAME' || true
    kubectl get clusterrole,clusterrolebinding 2>/dev/null \
      | grep ucp-descheduler || true
    
  6. Confirm from the output that the following items are no longer present:

    • ucp-descheduler deployment

    • ucp-descheduler-policy ConfigMap

    • ucp-descheduler cluster-scoped RBAC objects