Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set apiserver oom_adj to -10 to avoid OOMing before other pods #4282

Merged
merged 2 commits into from
May 20, 2019

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented May 17, 2019

This will allow users to be able to continue to run kubectl to diagnose a cluster that has OOM'd.

I'm open to other suggestions: apparently kubeadm doesn't let me set resource limits on pods in order to get placed into the guaranteed QoS class.

For reference, kubelet is configured for -16.

Example log messages:

I0517 07:50:08.225437   41021 ssh_runner.go:137] Run with output: cat /proc/$(pgrep kube-apiserver)/oom_adj
I0517 07:50:08.234262   41021 utils.go:240] > 16
I0517 07:50:08.234291   41021 kubeadm.go:234] apiserver oom_adj: 16
I0517 07:50:08.234299   41021 kubeadm.go:239] adjusting apiserver oom_adj to -10
I0517 07:50:08.234306   41021 ssh_runner.go:101] SSH: echo -10 | sudo tee /proc/$(pgrep kube-apiserver)/oom_adj
I0517 07:50:08.248105   41021 utils.go:240] > -10

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 17, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2019
@tstromberg tstromberg changed the title Set apiserver oom_adj to -16 to avoid OOMing before other pods Set apiserver oom_adj to -10 to avoid OOMing before other pods May 17, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2019
@tstromberg tstromberg requested a review from medyagh May 17, 2019 14:41
@tstromberg tstromberg merged commit f74c62a into kubernetes:master May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants