kube-prometheus icon indicating copy to clipboard operation
kube-prometheus copied to clipboard

Seeting CPU limits for container in the k8s resource

Open Leke-Ariyo opened this issue 2 years ago • 4 comments

I would like to set cpu limit for a specific container kube-rbac-proxy-main which is not the default one - in the k8s resource - kube-state-metrics in jsonnet, as currently, I am experiencing some CPU throttling.

how do I go about it.

Leke-Ariyo avatar Mar 02 '22 11:03 Leke-Ariyo

Answered in slack: https://kubernetes.slack.com/archives/CFFDS2Z7F/p1646219889287799

paulfantom avatar Mar 02 '22 12:03 paulfantom

From the Slack Thread:

{
  values: {
    kubeStateMetrics+:
      kubeRbacProxySelf+: {
        resources+: {
          limits: {
            cpu: '100m',
          },
        },
      },
    },
  },
}

@paulfantom commented:

Then it doesn't have logic from https://github.com/prometheus-operator/kube-prometheus/pull/1637 which is needed for this.

This means release-0-10 won't work.

foosinn avatar Mar 30 '22 08:03 foosinn

I ran into the same issue. Maybe the default cpu limits should be increased?

foosinn avatar Mar 30 '22 08:03 foosinn

This issue has been automatically marked as stale because it has not had any activity in the last 60 days. Thank you for your contributions.

github-actions[bot] avatar May 30 '22 03:05 github-actions[bot]

This issue was closed because it has not had any activity in the last 120 days. Please reopen if you feel this is still valid.

github-actions[bot] avatar Sep 27 '22 03:09 github-actions[bot]