-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
memorySwap: kubelet fails due to missing feature gate #8392
Comments
Note that this is an alpha feature and it may suffer changes. You have an example of how to set it up in the CI job: https://github.com/kubernetes-sigs/kubespray/blob/master/tests/files/packet_fedora35-calico-swap-selinux.yml As discussed in #8241 this will remain as experimental support until the feature graduates to beta and we know how it will look like in a stable implementation so it can be documented. |
Yes, this is the configuration that I'm currently using and that works for me. The issue is that I cannot opt out of this feature without setting This can be acceptable, but I think it would be clearer to decouple this feature from the |
Can you detail the use-case of allowing the node to have swap but not allowing the kubelet to track the usage? Unless you request swap for your pods this feature should not have an impact. |
I personally don't have one 😄 I was just surprised by the failure of the kubelet after the update, as I guess this implicit coupling of settings should either:
|
I feel |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Environment:
Cloud provider or hardware configuration: Hetzner VM
OS: CentOS 7
Version of Ansible:
ansible 2.9.14
Version of Python:
Python 3.8.10
Kubespray version:
52266406
, latestmaster
at time of opening this issueNetwork plugin used: calico
I am using kubespray on a server with swap, so I have
kubelet_fail_swap_on
set tofalse
. Since #8241, this also enables the alpha-stagememorySwap
functionality of the kubelet (Link). Unfortunately, this fails (even on Kubernetes v1.23.1) due to a missing feature gate. The stdout of kubelet shows:Note that the
NodeSwap
feature gate is disabled by default: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/When I enable the feature gate explicitly, all is well:
I'm honestly not sure how to best continue here. Maybe a documentation change would already be enough, emphasizing to enable the feature gate when using
kubelet_fail_swap_on: false
. Otherwise, I think of the following:NodeSwap
feature gate implicitly when settingkubelet_fail_swap_on: false
. I am not sure how this can be sanely handled in ansible.memorySwap
kubelet configuration fromkubelet_fail_swap_on
, so it is possible to use swap without using thememorySwap
functionality. This might be desirable when one does not want to use alpha-level features, but still use swap on the node itself. The new variable could be something likeenable_k8s_node_swap_usage
.What do you think?
The text was updated successfully, but these errors were encountered: