Coder Social home page Coder Social logo

Comments (2)

fbuchmeier-abi avatar fbuchmeier-abi commented on July 22, 2024

Hi @sarg3nt ,

could you check if the descheduler works for you when you use the new configuration format v1alpha2? I also had problems getting it to work and it turns out the v0.29.0 already ignores any v1alpha1 config like the one you have in your helm values. See the readme for references: https://github.com/kubernetes-sigs/descheduler?tab=readme-ov-file#policy-default-evictor-and-strategy-plugins

An example that is running fine for me looks like this:

# Recommended to use the latest Policy API version supported by the Descheduler app version
deschedulerPolicyAPIVersion: "descheduler/v1alpha2"

deschedulerPolicy:
  profiles:
    - name: default
      pluginConfig:
        - name: DefaultEvictor
          args:
            ignorePvcPods: true
            evictLocalStoragePods: true
        - name: RemoveDuplicates
        - name: RemovePodsHavingTooManyRestarts
          args:
            podRestartThreshold: 5
            includingInitContainers: true
        - name: LowNodeUtilization
          args:
            thresholds:
              cpu: 30
              memory: 30
              pods: 30
            targetThresholds:
              cpu: 70
              memory: 70
              pods: 70
      plugins:
        balance:
          enabled:
            - RemoveDuplicates
            - LowNodeUtilization
        deschedule:
          enabled:
            - RemovePodsHavingTooManyRestarts

You can also increase the verbosity of the logging output like this (see e.g. https://github.com/kubernetes-sigs/descheduler?tab=readme-ov-file#pod-evictions):

cmdOptions:
  v: 5

However, in case no balancer or evcition is configured this will not change much.

Once your config is correct it should output something along these lines:

descheduler-55b8cb6f58-kpfn4 descheduler I0521 15:33:32.238954       1 defaultevictor.go:202] "Pod fails the following checks" pod="kube-monitoring/prometheus-operator-kube-monitoring-prometheus-node-exportslk6q" checks="pod is a DaemonSet pod"
descheduler-55b8cb6f58-kpfn4 descheduler I0521 15:33:32.239001       1 defaultevictor.go:202] "Pod fails the following checks" pod="kube-system/descheduler-55b8cb6f58-kpfn4" checks="[pod has system critical priority, pod has higher priority than specified priority class threshold]"
descheduler-55b8cb6f58-kpfn4 descheduler I0521 15:33:32.239138       1 profile.go:356] "Total number of pods evicted" extension point="Balance" evictedPods=0

Best regards,
Florian.

from descheduler.

sarg3nt avatar sarg3nt commented on July 22, 2024

Hi @fbuchmeier-abi thanks for pointing that out. I think the "bug" then is that the default values in the 0.29.0 chart are wrong, as that was what I was using.
I saw that 0.30.0 was out so I upgraded to that and used your values and it worked.
I then took a look at the values.yaml for 0.30.0 which is release-1.30 (why???) and tried those and got more errors. Eventually I figured out that two values in the default deschedulerPolicy are not supported.

The commented out lines below are the culprits. nodeAffinityType and includeSoftConstraints

deschedulerPolicy:
  profiles:
    - name: default
      pluginConfig:
        - name: DefaultEvictor
          args:
            ignorePvcPods: true
            evictLocalStoragePods: true
        - name: RemoveDuplicates
        - name: RemovePodsHavingTooManyRestarts
          args:
            podRestartThreshold: 100
            includingInitContainers: true
        - name: RemovePodsViolatingNodeTaints
          # args:
          #   nodeAffinityType:
          #     - requiredDuringSchedulingIgnoredDuringExecution
        - name: RemovePodsViolatingInterPodAntiAffinity
        - name: RemovePodsViolatingTopologySpreadConstraint
          #args:
          #  includeSoftConstraints: false
        - name: LowNodeUtilization
          args:
            thresholds:
              cpu: 20
              memory: 20
              pods: 20
            targetThresholds:
              cpu: 50
              memory: 50
              pods: 50
      plugins:
        balance:
          enabled:
            - RemoveDuplicates
            - RemovePodsViolatingNodeAffinity
            - RemovePodsViolatingTopologySpreadConstraint
            - LowNodeUtilization
        deschedule:
          enabled:
            - RemovePodsHavingTooManyRestarts
            - RemovePodsViolatingNodeTaints
            - RemovePodsViolatingNodeAffinity
            - RemovePodsViolatingInterPodAntiAffinity

So maybe someone should update the vaules.yaml for 1.30
Thank you again. All is working now and I'll close with this comment.

from descheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.